Fixed bug relating to "empty" ItemStacks. Fixes #807

This commit is contained in:
GJ
2013-03-08 07:40:25 -05:00
parent 9618e45a11
commit bd45fff1b4
4 changed files with 14 additions and 12 deletions

View File

@ -72,7 +72,7 @@ public class Mining {
default:
if (ModUtils.isCustomMiningBlock(blockState)) {
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack());
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1));
}
return;
}

View File

@ -142,7 +142,7 @@ public class MiningManager extends SkillManager{
xp += Mining.getBlockXp(blockState);
}
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack()); // Initial block that would have been dropped
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1)); // Initial block that would have been dropped
if (!mcMMO.placeStore.isTrue(blockState)) {
for (int i = 1; i < dropMultiplier; i++) {
@ -156,7 +156,7 @@ public class MiningManager extends SkillManager{
if (debrisYield > 0) {
for (BlockState blockState : debris) {
if (Misc.getRandom().nextFloat() < debrisYield) {
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack());
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1));
}
}
}