mirror of
https://github.com/array-in-a-matrix/brainwine.git
synced 2025-04-02 11:11:58 -04:00
Fix identical seeds generating different zones because of ordering issue
This commit is contained in:
parent
fa5723da4c
commit
b3e024fee3
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ package brainwine.gameserver.util;
|
|||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
|
@ -15,7 +15,7 @@ import io.netty.util.internal.ThreadLocalRandom;
|
|||
|
||||
public class WeightedMap<T> {
|
||||
|
||||
private final Map<T, Double> entries = new HashMap<>();
|
||||
private final Map<T, Double> entries = new LinkedHashMap<>();
|
||||
private double totalWeight;
|
||||
|
||||
public WeightedMap() {}
|
||||
|
|
Loading…
Add table
Reference in a new issue