mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Added support for carrots and potatoes. Also updated to ignore beacon blocks and anvil blocks.
This commit is contained in:
parent
43fe92fe3f
commit
11f1889f1f
@ -165,6 +165,8 @@ public class Config extends ConfigLoader {
|
|||||||
public int getHerbalismXPLilyPads() { return config.getInt("Experience.Herbalism.Lily_Pads", 100); }
|
public int getHerbalismXPLilyPads() { return config.getInt("Experience.Herbalism.Lily_Pads", 100); }
|
||||||
public int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); }
|
public int getHerbalismXPVines() { return config.getInt("Experience.Herbalism.Vines", 10); }
|
||||||
public int getHerbalismXPCocoa() { return config.getInt("Experience.Herbalism.Cocoa",30); }
|
public int getHerbalismXPCocoa() { return config.getInt("Experience.Herbalism.Cocoa",30); }
|
||||||
|
public int getHerbalismXPCarrot() { return config.getInt("Experience.Herbalism.Carrot",30); }
|
||||||
|
public int getHerbalismXPPotato() { return config.getInt("Experience.Herbalism.Potato",30); }
|
||||||
|
|
||||||
public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
|
public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); }
|
||||||
public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
|
public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); }
|
||||||
@ -183,6 +185,8 @@ public class Config extends ConfigLoader {
|
|||||||
public boolean getWaterLiliesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Water_Lilies", true); }
|
public boolean getWaterLiliesDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Water_Lilies", true); }
|
||||||
public boolean getYellowFlowersDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Yellow_Flowers", true); }
|
public boolean getYellowFlowersDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Yellow_Flowers", true); }
|
||||||
public boolean getCocoaDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Cocoa", true); }
|
public boolean getCocoaDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Cocoa", true); }
|
||||||
|
public boolean getCarrotDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Carrot", true); }
|
||||||
|
public boolean getPotatoDoubleDropsEnabled() { return config.getBoolean("Double_Drops.Herbalism.Potato", true); }
|
||||||
|
|
||||||
public boolean herbalismDoubleDropsDisabled() {
|
public boolean herbalismDoubleDropsDisabled() {
|
||||||
ConfigurationSection section = config.getConfigurationSection("Double_Drops.Herbalism");
|
ConfigurationSection section = config.getConfigurationSection("Double_Drops.Herbalism");
|
||||||
|
@ -199,6 +199,20 @@ public class Herbalism {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CARROT:
|
||||||
|
if (((byte) data) == 0x3) {
|
||||||
|
mat = Material.CARROT;
|
||||||
|
xp = Config.getInstance().getHerbalismXPCarrot();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case POTATO:
|
||||||
|
if (((byte) data) == 0x3) {
|
||||||
|
mat = Material.POTATO;
|
||||||
|
xp = Config.getInstance().getHerbalismXPPotato();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (Config.getInstance().getBlockModsEnabled() && CustomBlocksConfig.getInstance().customHerbalismBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
|
if (Config.getInstance().getBlockModsEnabled() && CustomBlocksConfig.getInstance().customHerbalismBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
|
||||||
customPlant = true;
|
customPlant = true;
|
||||||
@ -221,6 +235,13 @@ public class Herbalism {
|
|||||||
if (mat == Material.COCOA) {
|
if (mat == Material.COCOA) {
|
||||||
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
|
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
|
||||||
}
|
}
|
||||||
|
else if (mat == Material.COCOA) {
|
||||||
|
is = new ItemStack(Material.CARROT_ITEM, 1, (short) 0);
|
||||||
|
}
|
||||||
|
else if (mat == Material.COCOA) {
|
||||||
|
is = new ItemStack(Material.POTATO_ITEM, 1, (short) 0);
|
||||||
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
is = new ItemStack(mat);
|
is = new ItemStack(mat);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,8 @@ public class BlockChecks {
|
|||||||
case YELLOW_FLOWER:
|
case YELLOW_FLOWER:
|
||||||
case COCOA:
|
case COCOA:
|
||||||
case EMERALD_ORE:
|
case EMERALD_ORE:
|
||||||
|
case CARROT:
|
||||||
|
case POTATO:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -98,6 +100,8 @@ public class BlockChecks {
|
|||||||
case WALL_SIGN:
|
case WALL_SIGN:
|
||||||
case WOODEN_DOOR:
|
case WOODEN_DOOR:
|
||||||
case WORKBENCH:
|
case WORKBENCH:
|
||||||
|
case BEACON:
|
||||||
|
case ANVIL:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -179,6 +183,8 @@ public class BlockChecks {
|
|||||||
case WATER_LILY:
|
case WATER_LILY:
|
||||||
case YELLOW_FLOWER:
|
case YELLOW_FLOWER:
|
||||||
case COCOA:
|
case COCOA:
|
||||||
|
case CARROT:
|
||||||
|
case POTATO:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CROPS:
|
case CROPS:
|
||||||
|
@ -198,6 +198,8 @@ Double_Drops:
|
|||||||
Wheat: true
|
Wheat: true
|
||||||
Yellow_Flowers: true
|
Yellow_Flowers: true
|
||||||
Cocoa: true
|
Cocoa: true
|
||||||
|
Carrot: true
|
||||||
|
Potato: true
|
||||||
Mining:
|
Mining:
|
||||||
Coal: true
|
Coal: true
|
||||||
Diamond: true
|
Diamond: true
|
||||||
@ -267,6 +269,8 @@ Experience:
|
|||||||
Lily_Pads: 100
|
Lily_Pads: 100
|
||||||
Vines: 10
|
Vines: 10
|
||||||
Cocoa: 30
|
Cocoa: 30
|
||||||
|
Carrot: 50
|
||||||
|
Potato: 50
|
||||||
Mining:
|
Mining:
|
||||||
Sandstone: 30
|
Sandstone: 30
|
||||||
Glowstone: 30
|
Glowstone: 30
|
||||||
|
Loading…
Reference in New Issue
Block a user