Skip to content

Commit

Permalink
2.1.39 - Added Seagrass/Tall_Seagrass to experience tables
Browse files Browse the repository at this point in the history
Salvage should sound a bit different to Repair now
Fixes #3863 #3862
  • Loading branch information
nossr50 committed Apr 9, 2019
1 parent f7b0789 commit f1204f8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Key:
! Change
- Removal

Version 2.1.39
Salvaging an item should now only play the item break sound (was playing the anvil sound simultaneously before)
Fixed bug where Tall_Grass was not giving full XP
Added Tall_Seagrass and Seagrass to experience.yml under Herbalism (update your configs)

NOTE: This is what your herbalism section in experience.yml should look like - https://paste.gg/p/anonymous/d5b03bd56e8442f2836f8a954d2974de
Version 2.1.38
Roll XP cooldown down from 60 seconds to 10
Updated pt_BR localization (thanks FabioZumbi12)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.38</version>
<version>2.1.39</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ public boolean processGreenTerra(BlockState blockState) {
public void herbalismBlockCheck(BlockState blockState) {
Player player = getPlayer();
Material material = blockState.getType();
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.CHORUS_PLANT
|| material == Material.SUGAR_CANE || material == Material.KELP_PLANT || material == Material.KELP);
boolean oneBlockPlant = isOneBlockPlant(material);

// Prevents placing and immediately breaking blocks for exp
if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) {
Expand Down Expand Up @@ -176,6 +175,12 @@ public void herbalismBlockCheck(BlockState blockState) {
applyXpGain(xp, XPGainReason.PVE);
}

public boolean isOneBlockPlant(Material material) {
return !(material == Material.CACTUS || material == Material.CHORUS_PLANT
|| material == Material.SUGAR_CANE || material == Material.KELP_PLANT || material == Material.KELP
|| material == Material.TALL_SEAGRASS || material == Material.TALL_GRASS);
}

/**
* Check for success on herbalism double drops
* @param blockState target block state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void handleSalvage(Location location, ItemStack item) {

// BWONG BWONG BWONG - CLUNK!
if (Config.getInstance().getSalvageAnvilUseSoundsEnabled()) {
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
// SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_BREAK);

//player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1.0F, 1.0F);
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ Experience:
Brown_Mushroom_Block: 70
Mushroom_Stem: 80
Herbalism:
Seagrass: 10
Tall_Seagrass: 10
Kelp: 3
Kelp_Plant: 3
Tube_Coral_Fan: 80
Expand Down

0 comments on commit f1204f8

Please sign in to comment.