mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Possible fix for #331
- Should ensure the server doesn't tick the chunksection while we're editing it - Basically using the old issue with FAWE breaking block ticking by setting this to zero :)
This commit is contained in:
parent
8f60544aad
commit
b1f1c0f4f0
@ -262,6 +262,10 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
|
||||
char[] setArr = set.load(layer);
|
||||
ChunkSection newSection;
|
||||
ChunkSection existingSection = sections[layer];
|
||||
|
||||
//ensure that the server doesn't try to tick the chunksection while we're editing it.
|
||||
BukkitAdapter_1_14.fieldTickingBlockCount.set(existingSection, (short) 0);
|
||||
|
||||
if (existingSection == null) {
|
||||
newSection = BukkitAdapter_1_14.newChunkSection(layer, setArr);
|
||||
if (BukkitAdapter_1_14.setSectionAtomic(sections, null, newSection, layer)) {
|
||||
|
@ -270,6 +270,10 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
||||
char[] setArr = set.load(layer);
|
||||
ChunkSection newSection;
|
||||
ChunkSection existingSection = sections[layer];
|
||||
|
||||
//ensure that the server doesn't try to tick the chunksection while we're editing it.
|
||||
BukkitAdapter_1_15.fieldTickingBlockCount.set(existingSection, (short) 0);
|
||||
|
||||
if (existingSection == null) {
|
||||
newSection = BukkitAdapter_1_15.newChunkSection(layer, setArr);
|
||||
if (BukkitAdapter_1_15.setSectionAtomic(sections, null, newSection, layer)) {
|
||||
|
@ -282,6 +282,10 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks {
|
||||
char[] setArr = set.load(layer);
|
||||
ChunkSection newSection;
|
||||
ChunkSection existingSection = sections[layer];
|
||||
|
||||
//ensure that the server doesn't try to tick the chunksection while we're editing it.
|
||||
BukkitAdapter_1_15_2.fieldTickingBlockCount.set(existingSection, (short) 0);
|
||||
|
||||
if (existingSection == null) {
|
||||
newSection = BukkitAdapter_1_15_2.newChunkSection(layer, setArr);
|
||||
if (BukkitAdapter_1_15_2.setSectionAtomic(sections, null, newSection, layer)) {
|
||||
|
Loading…
Reference in New Issue
Block a user