mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-22 16:05:02 +00:00
Attempt to fix #2154
This commit is contained in:
parent
15e9d2d395
commit
f0d998e2c0
2 changed files with 19 additions and 7 deletions
|
@ -279,6 +279,14 @@ public class BukkitLocalQueue_1_8_3 extends BukkitLocalQueue<char[]> {
|
||||||
Map<?, ?> tiles = (Map<?, ?>) tileEntities.get(c);
|
Map<?, ?> tiles = (Map<?, ?>) tileEntities.get(c);
|
||||||
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
||||||
|
|
||||||
|
// We need to update entities to make it mutable
|
||||||
|
for (int i = 0; i < entities.length; i++) {
|
||||||
|
final Collection<?> list = new ArrayList<>(entities[i]);
|
||||||
|
entities[i] = list;
|
||||||
|
}
|
||||||
|
// Force update the field. This shouldn't be necessary, but weird stuff happened
|
||||||
|
entitySlices.set(c, entities);
|
||||||
|
|
||||||
Method getX = null;
|
Method getX = null;
|
||||||
Method getY = null;
|
Method getY = null;
|
||||||
Method getZ = null;
|
Method getZ = null;
|
||||||
|
|
|
@ -5,17 +5,13 @@ import com.intellectualcrafters.plot.object.PseudoRandom;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
import com.intellectualcrafters.plot.util.ReflectionUtils;
|
import com.intellectualcrafters.plot.util.ReflectionUtils;
|
||||||
import com.intellectualcrafters.plot.util.block.BasicLocalBlockQueue;
|
import com.intellectualcrafters.plot.util.block.BasicLocalBlockQueue;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
|
||||||
|
|
||||||
|
@ -256,6 +252,14 @@ public class BukkitLocalQueue_1_9 extends BukkitLocalQueue<char[]> {
|
||||||
Map<?, ?> tiles = (Map<?, ?>) tf.get(c);
|
Map<?, ?> tiles = (Map<?, ?>) tf.get(c);
|
||||||
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
Collection<?>[] entities = (Collection<?>[]) entitySlices.get(c);
|
||||||
|
|
||||||
|
// We need to update entities to make it mutable
|
||||||
|
for (int i = 0; i < entities.length; i++) {
|
||||||
|
final Collection<?> list = new ArrayList<>(entities[i]);
|
||||||
|
entities[i] = list;
|
||||||
|
}
|
||||||
|
// Force update the field. This shouldn't be necessary, but weird stuff happened
|
||||||
|
entitySlices.set(c, entities);
|
||||||
|
|
||||||
Method xm = null;
|
Method xm = null;
|
||||||
Method ym = null;
|
Method ym = null;
|
||||||
Method zm = null;
|
Method zm = null;
|
||||||
|
|
Loading…
Reference in a new issue