Moving the center of block drops to block center. Fixes #2544.

This commit is contained in:
Sid Shakal
2016-03-16 11:47:40 -05:00
parent 1488946fc5
commit 123a139e43
9 changed files with 26 additions and 21 deletions

View File

@ -181,7 +181,7 @@ public class HerbalismManager extends SkillManager {
for (int i = greenTerra ? 2 : 1; i != 0; i--) {
if (SkillUtils.activationSuccessful(SecondaryAbility.HERBALISM_DOUBLE_DROPS, getPlayer(), getSkillLevel(), activationChance)) {
for (ItemStack item : drops) {
Misc.dropItems(blockState.getLocation(), item, amount);
Misc.dropItems(Misc.getBlockCenter(blockState), item, amount);
}
}
}
@ -246,7 +246,7 @@ public class HerbalismManager extends SkillManager {
return false;
}
int skillLevel = getSkillLevel();
Location location = blockState.getLocation();
Location location = Misc.getBlockCenter(blockState);
for (HylianTreasure treasure : treasures) {
if (skillLevel >= treasure.getDropLevel() && SkillUtils.treasureDropSuccessful(getPlayer(), treasure.getDropChance(), activationChance)) {