From 631217a7f4e319a65db03a71215e1c890c61ec79 Mon Sep 17 00:00:00 2001 From: Axionize <154778082+Axionize@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:16:01 -0500 Subject: [PATCH] Fix very rare CME; investigate cause later --- .../java/ac/grim/grimac/utils/change/PlayerBlockHistory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ac/grim/grimac/utils/change/PlayerBlockHistory.java b/src/main/java/ac/grim/grimac/utils/change/PlayerBlockHistory.java index 0cd9b1f756..8b2d42b1fd 100644 --- a/src/main/java/ac/grim/grimac/utils/change/PlayerBlockHistory.java +++ b/src/main/java/ac/grim/grimac/utils/change/PlayerBlockHistory.java @@ -2,15 +2,16 @@ import com.github.retrooper.packetevents.protocol.world.states.WrappedBlockState; -import java.util.ArrayDeque; import java.util.Deque; import java.util.List; +import java.util.concurrent.ConcurrentLinkedDeque; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; public class PlayerBlockHistory { - public final Deque modificationQueue = new ArrayDeque<>(); + // TODO, figure out how its possible for this to CME! + public final Deque modificationQueue = new ConcurrentLinkedDeque<>(); // Add a new block modification to the history. public void add(BlockModification modification) {