diff options
author | Vixid <52578495+VixidDev@users.noreply.github.com> | 2023-11-15 08:48:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 09:48:12 +0100 |
commit | ea10ac8a26ca473ba341926f7a2c806c5887ab36 (patch) | |
tree | 55ad76bae56e49c90ff424ffac9f780a78256123 /src | |
parent | bc501f4eae427ce4ad07b6d78ac9f1f7764ccdb6 (diff) | |
download | NotEnoughUpdates-ea10ac8a26ca473ba341926f7a2c806c5887ab36.tar.gz NotEnoughUpdates-ea10ac8a26ca473ba341926f7a2c806c5887ab36.tar.bz2 NotEnoughUpdates-ea10ac8a26ca473ba341926f7a2c806c5887ab36.zip |
Fix crash when quitting with ch chest highlighted (#932)
Clear highlightedBlocks on world unload instead
Diffstat (limited to 'src')
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/CrystalHollowChestHighlighter.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/CrystalHollowChestHighlighter.java index 61c96aad..7351509b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/CrystalHollowChestHighlighter.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/CrystalHollowChestHighlighter.java @@ -90,6 +90,7 @@ public class CrystalHollowChestHighlighter extends GenericBlockHighlighter { }); blockToRemove.forEach(highlightedBlocks::remove); + blockToRemove.forEach(markedBlocks::remove); } @SubscribeEvent diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/GenericBlockHighlighter.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/GenericBlockHighlighter.java index 5cacff2b..85230d7b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/GenericBlockHighlighter.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/world/GenericBlockHighlighter.java @@ -106,7 +106,7 @@ public abstract class GenericBlockHighlighter { } @SubscribeEvent - public void onWorldChange(WorldEvent.Load event) { + public void onWorldChange(WorldEvent.Unload event) { highlightedBlocks.clear(); } |