From c05c8e1b1d40edf5db8c73b6e8f99acc9fdc088d Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 31 Dec 2020 16:08:23 -0800 Subject: [PATCH] Fix init player in TransientyEntityTracker --- .../com/gmail/nossr50/skills/taming/TamingManager.java | 2 +- .../java/com/gmail/nossr50/util/MaterialMapStore.java | 9 +++++++++ .../com/gmail/nossr50/util/TransientEntityTracker.java | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index d3160f50c..0ec720ec1 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -41,7 +41,7 @@ public class TamingManager extends SkillManager { private static HashMap cotwSummonDataProperties; private long lastSummonTimeStamp; - public TamingManager(McMMOPlayer mcMMOPlayer) { + public TamingManager(@NotNull McMMOPlayer mcMMOPlayer) { super(mcMMOPlayer, PrimarySkillType.TAMING); init(); } diff --git a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java index 6be54c63c..0f0bcc25c 100644 --- a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java +++ b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java @@ -54,6 +54,8 @@ public class MaterialMapStore { private final @NotNull HashSet enchantables; private final @NotNull HashSet ores; + private final @NotNull HashSet intendedToolPickAxe; + private final @NotNull HashSet intendedToolShovel; private final @NotNull HashMap tierValue; @@ -99,6 +101,8 @@ public class MaterialMapStore { enchantables = new HashSet<>(); ores = new HashSet<>(); + intendedToolPickAxe = new HashSet<>(); + intendedToolShovel = new HashSet<>(); tierValue = new HashMap<>(); @@ -206,6 +210,11 @@ public class MaterialMapStore { ores.add("gilded_blackstone"); } + private void fillIntendedTools() { + intendedToolPickAxe.addAll(ores); + + } + private void fillArmors() { fillLeatherArmorWhiteList(); fillIronArmorWhiteList(); diff --git a/src/main/java/com/gmail/nossr50/util/TransientEntityTracker.java b/src/main/java/com/gmail/nossr50/util/TransientEntityTracker.java index a5495864e..486842f7f 100644 --- a/src/main/java/com/gmail/nossr50/util/TransientEntityTracker.java +++ b/src/main/java/com/gmail/nossr50/util/TransientEntityTracker.java @@ -46,6 +46,8 @@ public class TransientEntityTracker { } private void registerPlayer(@NotNull UUID playerUUID) { + perPlayerTransientEntityMap.put(playerUUID, new HashMap>()); + for(CallOfTheWildType callOfTheWildType : CallOfTheWildType.values()) { perPlayerTransientEntityMap.get(playerUUID).put(callOfTheWildType, new HashSet<>()); }