forked from SteamWar/SteamWar
Fix IngameListener
This commit is contained in:
@@ -73,7 +73,7 @@ public class IngameListener extends GameStateBukkitListener {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
List<Pos> blocksToBreak = blocksToMelt.entrySet().stream()
|
List<Pos> blocksToBreak = blocksToMelt.entrySet().stream()
|
||||||
.filter(entry -> entry.getValue() == time)
|
.filter(entry -> entry.getValue() <= time)
|
||||||
.map(Map.Entry::getKey)
|
.map(Map.Entry::getKey)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
time++;
|
time++;
|
||||||
@@ -268,7 +268,7 @@ public class IngameListener extends GameStateBukkitListener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Pos pos = new Pos(block.getLocation().getBlockX(), block.getLocation().getBlockY(), block.getLocation().getBlockZ());
|
Pos pos = new Pos(block.getLocation().getBlockX(), block.getLocation().getBlockY(), block.getLocation().getBlockZ());
|
||||||
blocksToMelt.putIfAbsent(pos, time + meltingTime);
|
blocksToMelt.putIfAbsent(pos, time + meltingTime + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
Reference in New Issue
Block a user