Fix init player in TransientyEntityTracker

This commit is contained in:
nossr50 2020-12-31 16:08:23 -08:00
parent 3f6de1c4ba
commit c05c8e1b1d
3 changed files with 12 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public class TamingManager extends SkillManager {
private static HashMap<CallOfTheWildType, TamingSummon> cotwSummonDataProperties; private static HashMap<CallOfTheWildType, TamingSummon> cotwSummonDataProperties;
private long lastSummonTimeStamp; private long lastSummonTimeStamp;
public TamingManager(McMMOPlayer mcMMOPlayer) { public TamingManager(@NotNull McMMOPlayer mcMMOPlayer) {
super(mcMMOPlayer, PrimarySkillType.TAMING); super(mcMMOPlayer, PrimarySkillType.TAMING);
init(); init();
} }

View File

@ -54,6 +54,8 @@ public class MaterialMapStore {
private final @NotNull HashSet<String> enchantables; private final @NotNull HashSet<String> enchantables;
private final @NotNull HashSet<String> ores; private final @NotNull HashSet<String> ores;
private final @NotNull HashSet<String> intendedToolPickAxe;
private final @NotNull HashSet<String> intendedToolShovel;
private final @NotNull HashMap<String, Integer> tierValue; private final @NotNull HashMap<String, Integer> tierValue;
@ -99,6 +101,8 @@ public class MaterialMapStore {
enchantables = new HashSet<>(); enchantables = new HashSet<>();
ores = new HashSet<>(); ores = new HashSet<>();
intendedToolPickAxe = new HashSet<>();
intendedToolShovel = new HashSet<>();
tierValue = new HashMap<>(); tierValue = new HashMap<>();
@ -206,6 +210,11 @@ public class MaterialMapStore {
ores.add("gilded_blackstone"); ores.add("gilded_blackstone");
} }
private void fillIntendedTools() {
intendedToolPickAxe.addAll(ores);
}
private void fillArmors() { private void fillArmors() {
fillLeatherArmorWhiteList(); fillLeatherArmorWhiteList();
fillIronArmorWhiteList(); fillIronArmorWhiteList();

View File

@ -46,6 +46,8 @@ public class TransientEntityTracker {
} }
private void registerPlayer(@NotNull UUID playerUUID) { private void registerPlayer(@NotNull UUID playerUUID) {
perPlayerTransientEntityMap.put(playerUUID, new HashMap<CallOfTheWildType, HashSet<TrackedTamingEntity>>());
for(CallOfTheWildType callOfTheWildType : CallOfTheWildType.values()) { for(CallOfTheWildType callOfTheWildType : CallOfTheWildType.values()) {
perPlayerTransientEntityMap.get(playerUUID).put(callOfTheWildType, new HashSet<>()); perPlayerTransientEntityMap.get(playerUUID).put(callOfTheWildType, new HashSet<>());
} }