mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Added Nether Wart, Lily Pads, and Vines to Herbalism
This commit is contained in:
parent
ddf7920c4d
commit
3679d782e3
@ -43,7 +43,8 @@ public class LoadProperties
|
|||||||
berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss,
|
berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss,
|
||||||
feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond, rString, rLeather,
|
feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond, rString, rLeather,
|
||||||
downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4, keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4,
|
downgradeRank1, downgradeRank2, downgradeRank3, downgradeRank4, keepEnchantsRank1, keepEnchantsRank2, keepEnchantsRank3, keepEnchantsRank4,
|
||||||
fishingDropChanceTier1, fishingDropChanceTier2, fishingDropChanceTier3, fishingDropChanceTier4, fishingDropChanceTier5;
|
fishingDropChanceTier1, fishingDropChanceTier2, fishingDropChanceTier3, fishingDropChanceTier4, fishingDropChanceTier5,
|
||||||
|
mnetherwart, mvines, mlilypad;
|
||||||
|
|
||||||
public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, fishing_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b,
|
public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, fishing_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b,
|
||||||
excavation_r, excavation_g, excavation_b, herbalism_r, herbalism_g, herbalism_b, mining_r, mining_g, mining_b,
|
excavation_r, excavation_g, excavation_b, herbalism_r, herbalism_g, herbalism_b, mining_r, mining_g, mining_b,
|
||||||
@ -220,6 +221,8 @@ public class LoadProperties
|
|||||||
write("Experience.Formula.Multiplier.Axes", 1.0);
|
write("Experience.Formula.Multiplier.Axes", 1.0);
|
||||||
write("Experience.Formula.Multiplier.Sorcery", 1.0);
|
write("Experience.Formula.Multiplier.Sorcery", 1.0);
|
||||||
write("Experience.Formula.Multiplier.Acrobatics", 1.0);
|
write("Experience.Formula.Multiplier.Acrobatics", 1.0);
|
||||||
|
|
||||||
|
//Mining XP values
|
||||||
write("Experience.Mining.Gold", 350);
|
write("Experience.Mining.Gold", 350);
|
||||||
write("Experience.Mining.Diamond", 750);
|
write("Experience.Mining.Diamond", 750);
|
||||||
write("Experience.Mining.Iron", 250);
|
write("Experience.Mining.Iron", 250);
|
||||||
@ -231,16 +234,25 @@ public class LoadProperties
|
|||||||
write("Experience.Mining.Coal", 100);
|
write("Experience.Mining.Coal", 100);
|
||||||
write("Experience.Mining.Stone", 30);
|
write("Experience.Mining.Stone", 30);
|
||||||
write("Experience.Mining.Sandstone", 30);
|
write("Experience.Mining.Sandstone", 30);
|
||||||
|
|
||||||
|
//Herbalism XP values
|
||||||
write("Experience.Herbalism.Sugar_Cane", 30);
|
write("Experience.Herbalism.Sugar_Cane", 30);
|
||||||
write("Experience.Herbalism.Cactus", 30);
|
write("Experience.Herbalism.Cactus", 30);
|
||||||
write("Experience.Herbalism.Pumpkin", 550);
|
write("Experience.Herbalism.Pumpkin", 20);
|
||||||
write("Experience.Herbalism.Flowers", 100);
|
write("Experience.Herbalism.Flowers", 100);
|
||||||
write("Experience.Herbalism.Wheat", 50);
|
write("Experience.Herbalism.Wheat", 50);
|
||||||
write("Experience.Herbalism.Mushrooms", 150);
|
write("Experience.Herbalism.Mushrooms", 150);
|
||||||
write("Experience.Herbalism.Melon", 40);
|
write("Experience.Herbalism.Melon", 20);
|
||||||
|
write("Experience.Herbalism.Nether_Wart", 50);
|
||||||
|
write("Experience.Herbalism.Lily_Pads", 100);
|
||||||
|
write("Experience.Herbalism.Vines", 10);
|
||||||
|
|
||||||
|
//Woodcutting XP values
|
||||||
write("Experience.Woodcutting.Pine", 90);
|
write("Experience.Woodcutting.Pine", 90);
|
||||||
write("Experience.Woodcutting.Birch", 70);
|
write("Experience.Woodcutting.Birch", 70);
|
||||||
write("Experience.Woodcutting.Spruce", 80);
|
write("Experience.Woodcutting.Spruce", 80);
|
||||||
|
|
||||||
|
//Excavation XP values
|
||||||
write("Experience.Excavation.Base", 40);
|
write("Experience.Excavation.Base", 40);
|
||||||
write("Experience.Excavation.Mushroom", 80);
|
write("Experience.Excavation.Mushroom", 80);
|
||||||
write("Experience.Excavation.Sulphur", 30);
|
write("Experience.Excavation.Sulphur", 30);
|
||||||
@ -258,6 +270,8 @@ public class LoadProperties
|
|||||||
write("Experience.Excavation.String", 200);
|
write("Experience.Excavation.String", 200);
|
||||||
write("Experience.Excavation.Bucket", 100);
|
write("Experience.Excavation.Bucket", 100);
|
||||||
write("Experience.Excavation.Web", 150);
|
write("Experience.Excavation.Web", 150);
|
||||||
|
|
||||||
|
//Fishing XP values
|
||||||
write("Experience.Fishing.Base", 800);
|
write("Experience.Fishing.Base", 800);
|
||||||
|
|
||||||
//write("Sorcery.Spells.Water.Thunder", 75);
|
//write("Sorcery.Spells.Water.Thunder", 75);
|
||||||
@ -490,10 +504,13 @@ public class LoadProperties
|
|||||||
msugar = readInteger("Experience.Herbalism.Sugar_Cane", 30);
|
msugar = readInteger("Experience.Herbalism.Sugar_Cane", 30);
|
||||||
mwheat = readInteger("Experience.Herbalism.Wheat", 50);
|
mwheat = readInteger("Experience.Herbalism.Wheat", 50);
|
||||||
mcactus = readInteger("Experience.Herbalism.Cactus", 30);
|
mcactus = readInteger("Experience.Herbalism.Cactus", 30);
|
||||||
mpumpkin = readInteger("Experience.Herbalism.Pumpkin", 550);
|
mpumpkin = readInteger("Experience.Herbalism.Pumpkin", 20);
|
||||||
mflower = readInteger("Experience.Herbalism.Flowers", 100);
|
mflower = readInteger("Experience.Herbalism.Flowers", 100);
|
||||||
mmushroom = readInteger("Experience.Herbalism.Mushrooms", 150);
|
mmushroom = readInteger("Experience.Herbalism.Mushrooms", 150);
|
||||||
mmelon = readInteger("Experience.Herbalism.Melon", 20);
|
mmelon = readInteger("Experience.Herbalism.Melon", 20);
|
||||||
|
mnetherwart = readInteger("Experience.Herbalism.Nether_Wart", 50);
|
||||||
|
mlilypad = readInteger("Experience.Herbalism.Lily_Pads", 100);
|
||||||
|
mvines = readInteger("Experience.Herbalism.Vines", 10);
|
||||||
|
|
||||||
mpine = readInteger("Experience.Woodcutting.Pine", 70);
|
mpine = readInteger("Experience.Woodcutting.Pine", 70);
|
||||||
mbirch = readInteger("Experience.Woodcutting.Birch", 80);
|
mbirch = readInteger("Experience.Woodcutting.Birch", 80);
|
||||||
|
@ -157,6 +157,8 @@ public class Herbalism
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Wheat
|
||||||
if(type == 59 && block.getData() == (byte) 0x7)
|
if(type == 59 && block.getData() == (byte) 0x7)
|
||||||
{
|
{
|
||||||
mat = Material.getMaterial(296);
|
mat = Material.getMaterial(296);
|
||||||
@ -199,8 +201,24 @@ public class Herbalism
|
|||||||
block.setData((byte) 0x4);
|
block.setData((byte) 0x4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Nether Wart
|
||||||
|
if(type == 115 && block.getData() == (byte) 0x3)
|
||||||
|
{
|
||||||
|
mat = Material.getMaterial(372);
|
||||||
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||||
|
PP.addXP(SkillType.HERBALISM, LoadProperties.mnetherwart, player);
|
||||||
|
if(player != null)
|
||||||
|
{
|
||||||
|
if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM))
|
||||||
|
{
|
||||||
|
m.mcDropItem(loc, is);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to check not-wheat stuff for if it was placed by the player or not
|
* We need to check not-wheat and not-netherwart stuff for if it was placed by the player or not
|
||||||
*/
|
*/
|
||||||
if(block.getData() != (byte) 5)
|
if(block.getData() != (byte) 5)
|
||||||
{
|
{
|
||||||
@ -298,8 +316,9 @@ public class Herbalism
|
|||||||
//Melon
|
//Melon
|
||||||
if(type == 103)
|
if(type == 103)
|
||||||
{
|
{
|
||||||
mat = Material.getMaterial(block.getTypeId());
|
mat = Material.getMaterial(360);
|
||||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
int slices = (int) ((Math.random() + 3) + (int)(Math.random() * 4)); //drop 3-7 melon slices rather than melon blocks
|
||||||
|
is = new ItemStack(mat, slices, (byte)0, (byte)0);
|
||||||
|
|
||||||
if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM))
|
if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM))
|
||||||
{
|
{
|
||||||
@ -332,6 +351,29 @@ public class Herbalism
|
|||||||
}
|
}
|
||||||
PP.addXP(SkillType.HERBALISM, LoadProperties.mflower, player);
|
PP.addXP(SkillType.HERBALISM, LoadProperties.mflower, player);
|
||||||
}
|
}
|
||||||
|
//Lily Pads
|
||||||
|
if(type == 111)
|
||||||
|
{
|
||||||
|
mat = Material.getMaterial(block.getTypeId());
|
||||||
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||||
|
if(player != null){
|
||||||
|
if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)){
|
||||||
|
m.mcDropItem(loc, is);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PP.addXP(SkillType.HERBALISM, LoadProperties.mlilypad, player);
|
||||||
|
}
|
||||||
|
//Vines
|
||||||
|
if(type == 106){
|
||||||
|
mat = Material.getMaterial(block.getTypeId());
|
||||||
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||||
|
if(player != null){
|
||||||
|
if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)){
|
||||||
|
m.mcDropItem(loc, is);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PP.addXP(SkillType.HERBALISM, LoadProperties.mvines, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Skills.XpCheckSkill(SkillType.HERBALISM, player);
|
Skills.XpCheckSkill(SkillType.HERBALISM, player);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user