mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed Blast Mining not giving triple drop when it should
This commit is contained in:
parent
f30debd1b3
commit
9b438d0caa
@ -25,6 +25,7 @@ Version 1.3.06-dev
|
|||||||
= Fixed bugs with the way /mctop displayed
|
= Fixed bugs with the way /mctop displayed
|
||||||
= Fixed issues with custom characters & locale files.
|
= Fixed issues with custom characters & locale files.
|
||||||
= Fixed double explosion for Blast Mining
|
= Fixed double explosion for Blast Mining
|
||||||
|
= Fixed Blast Mining not giving triple drops when it should
|
||||||
! Changed how we handled the config file to prevent any bugs when returning values
|
! Changed how we handled the config file to prevent any bugs when returning values
|
||||||
! Changed locale files to use a new naming scheme. This breaks ALL old locale files. If you want to assist with re-translating anything, go to getlocalization.com/mcMMO
|
! Changed locale files to use a new naming scheme. This breaks ALL old locale files. If you want to assist with re-translating anything, go to getlocalization.com/mcMMO
|
||||||
! Changed mcremove to check for users in the MySQL DB before sending queries to remove them
|
! Changed mcremove to check for users in the MySQL DB before sending queries to remove them
|
||||||
|
@ -41,22 +41,18 @@ public class BlastMining {
|
|||||||
* @return A list of blocks dropped from the explosion
|
* @return A list of blocks dropped from the explosion
|
||||||
*/
|
*/
|
||||||
private static List<Block> explosionYields(List<Block> ores, List<Block> debris, float yield, float oreBonus, float debrisReduction, int extraDrops) {
|
private static List<Block> explosionYields(List<Block> ores, List<Block> debris, float yield, float oreBonus, float debrisReduction, int extraDrops) {
|
||||||
Iterator<Block> iterator2 = ores.iterator();
|
Iterator<Block> oresIterator = ores.iterator();
|
||||||
List<Block> blocksDropped = new ArrayList<Block>();
|
List<Block> blocksDropped = new ArrayList<Block>();
|
||||||
|
|
||||||
while (iterator2.hasNext()) {
|
while (oresIterator.hasNext()) {
|
||||||
Block temp = iterator2.next();
|
Block temp = oresIterator.next();
|
||||||
|
|
||||||
if (random.nextFloat() < (yield + oreBonus)) {
|
if (random.nextFloat() < (yield + oreBonus)) {
|
||||||
blocksDropped.add(temp);
|
blocksDropped.add(temp);
|
||||||
Mining.miningDrops(temp);
|
Mining.miningDrops(temp);
|
||||||
|
|
||||||
if (!temp.hasMetadata("mcmmoPlacedBlock")) {
|
if (!temp.hasMetadata("mcmmoPlacedBlock")) {
|
||||||
if (extraDrops == 2) {
|
for (int i = 1 ; i < extraDrops ; i++) {
|
||||||
blocksDropped.add(temp);
|
|
||||||
Mining.miningDrops(temp);
|
|
||||||
}
|
|
||||||
if (extraDrops == 3) {
|
|
||||||
blocksDropped.add(temp);
|
blocksDropped.add(temp);
|
||||||
Mining.miningDrops(temp);
|
Mining.miningDrops(temp);
|
||||||
}
|
}
|
||||||
@ -64,11 +60,11 @@ public class BlastMining {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yield - debrisReduction != 0) {
|
if (yield - debrisReduction > 0) {
|
||||||
Iterator<Block> iterator3 = debris.iterator();
|
Iterator<Block> debrisIterator = debris.iterator();
|
||||||
|
|
||||||
while (iterator3.hasNext()) {
|
while (debrisIterator.hasNext()) {
|
||||||
Block temp = iterator3.next();
|
Block temp = debrisIterator.next();
|
||||||
|
|
||||||
if (random.nextFloat() < (yield - debrisReduction))
|
if (random.nextFloat() < (yield - debrisReduction))
|
||||||
Mining.miningDrops(temp);
|
Mining.miningDrops(temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user