mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-28 03:57:38 +01:00
Merge branch 'master' of https://github.com/boy0001/FastAsyncWorldedit
This commit is contained in:
commit
d32bcaac4b
@ -247,7 +247,7 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<net.minecraft.server.v1_10_R1.Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
char[] array = this.getIdArray(i);
|
||||
|
@ -268,7 +268,7 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
char[] array = this.getIdArray(i);
|
||||
|
@ -3,6 +3,7 @@ package com.boydti.fawe.bukkit.v1_12;
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.bukkit.v0.BukkitQueue_0;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.example.CharFaweChunk;
|
||||
import com.boydti.fawe.object.FaweChunk;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
@ -246,7 +247,7 @@ public class BukkitChunk_1_12 extends CharFaweChunk<Chunk, BukkitQueue_1_12> {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
int layerYStart = i << 4;
|
||||
|
@ -163,7 +163,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
char[] array = this.getIdArray(i);
|
||||
|
@ -93,7 +93,7 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
char[] array = this.getIdArray(i);
|
||||
|
@ -183,7 +183,7 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
char[] array = this.getIdArray(i);
|
||||
|
@ -324,6 +324,12 @@ public class Settings extends Config {
|
||||
"Disable using native libraries",
|
||||
})
|
||||
public boolean DISABLE_NATIVES = false;
|
||||
|
||||
@Comment({
|
||||
"[SAFE] Keep entities that are positioned in non-air blocks when editing an area",
|
||||
"Might cause client-side FPS lagg in some situations"
|
||||
})
|
||||
public boolean KEEP_ENTITIES_IN_BLOCKS = false;
|
||||
}
|
||||
|
||||
public static class WEB {
|
||||
|
@ -174,7 +174,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
continue;
|
||||
} else if (count >= 4096) {
|
||||
entities[i] = new ClassInheritanceMultiMap<>(Entity.class);
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -182,7 +182,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
nmsWorld.removeEntity(ent);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -182,7 +182,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
nmsWorld.removeEntity(ent);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -169,7 +169,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
continue;
|
||||
} else if (count >= 4096) {
|
||||
entities[i].clear();
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -92,7 +92,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
continue;
|
||||
} else if (count >= 4096) {
|
||||
entities[i] = new ClassInheritanceMultiMap<>(Entity.class);
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -173,7 +173,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
||||
continue;
|
||||
} else if (count >= 4096) {
|
||||
entities[i] = new ClassInheritanceMultiMap<>(Entity.class);
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
|
@ -96,7 +96,7 @@ public class NukkitChunk extends CharFaweChunk<BaseFullChunk, NukkitQueue> {
|
||||
}
|
||||
|
||||
Map<Long, Entity> ents = chunk.getEntities();
|
||||
if (!ents.isEmpty()) {
|
||||
if (!ents.isEmpty() && !getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
Iterator<Map.Entry<Long, Entity>> iter = ents.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Map.Entry<Long, Entity> entry = iter.next();
|
||||
|
@ -185,7 +185,7 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
|
||||
entities[i] = new ClassInheritanceMultiMap<>(Entity.class);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
synchronized (SpongeChunk_1_11.class) {
|
||||
|
@ -185,7 +185,7 @@ public class SpongeChunk_1_12 extends CharFaweChunk<Chunk, SpongeQueue_1_12> {
|
||||
entities[i] = new ClassInheritanceMultiMap<>(Entity.class);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!getParent().getSettings().EXPERIMENTAL.KEEP_ENTITIES_IN_BLOCKS) {
|
||||
char[] array = this.getIdArray(i);
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
synchronized (SpongeChunk_1_12.class) {
|
||||
|
Loading…
Reference in New Issue
Block a user