mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
Debug no adapter
This commit is contained in:
parent
2637cbc9cd
commit
1fac6b710d
@ -158,6 +158,7 @@ public abstract class BukkitQueue_0<CHUNK, CHUNKSECTIONS, SECTION> extends NMSMa
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
Fawe.debug("====== NO NATIVE WORLDEDIT ADAPTER ======");
|
||||
e.printStackTrace();
|
||||
Fawe.debug("Try updating WorldEdit: ");
|
||||
Fawe.debug(" - http://builds.enginehub.org/job/worldedit?branch=master");
|
||||
Fawe.debug("See also: http://wiki.sk89q.com/wiki/WorldEdit/Bukkit_adapters");
|
||||
|
@ -199,7 +199,7 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
|
||||
} else if (count >= 4096) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
@ -209,7 +209,7 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Entity[] entsArr = ents.toArray(new Entity[ents.size()]);
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (Entity entity : entsArr) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
continue;
|
||||
@ -228,7 +228,7 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
|
||||
}
|
||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||
if (!entsToRemove.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (int i = 0; i < entities.length; i++) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (ents.isEmpty()) {
|
||||
@ -246,7 +246,7 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
|
||||
Set<CompoundTag> entitiesToSpawn = this.getEntities();
|
||||
Set<UUID> createdEntities = new HashSet<>();
|
||||
if (!entitiesToSpawn.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (CompoundTag nativeTag : entitiesToSpawn) {
|
||||
Map<String, Tag> entityTagMap = ReflectionUtils.getMap(nativeTag.getValue());
|
||||
StringTag idTag = (StringTag) entityTagMap.get("Id");
|
||||
|
@ -227,7 +227,7 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
||||
// Remove entities
|
||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||
if (!entsToRemove.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (int i = 0; i < entities.length; i++) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (ents.isEmpty()) {
|
||||
@ -256,7 +256,7 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
||||
copy.storeEntity(entity);
|
||||
}
|
||||
}
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
@ -266,7 +266,7 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || ents == null || ents.isEmpty()) continue;
|
||||
Entity[] entsArr = ents.toArray(new Entity[ents.size()]);
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (Entity entity : entsArr) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
continue;
|
||||
@ -290,7 +290,7 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
|
||||
Set<CompoundTag> entitiesToSpawn = this.getEntities();
|
||||
Set<UUID> createdEntities = new HashSet<>();
|
||||
if (!entitiesToSpawn.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (CompoundTag nativeTag : entitiesToSpawn) {
|
||||
Map<String, Tag> entityTagMap = ReflectionUtils.getMap(nativeTag.getValue());
|
||||
StringTag idTag = (StringTag) entityTagMap.get("Id");
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.boydti.fawe.bukkit.v1_11;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.bukkit.v0.BukkitQueue_0;
|
||||
import com.boydti.fawe.example.CharFaweChunk;
|
||||
@ -127,9 +126,9 @@ public class BukkitQueue_1_11 extends BukkitQueue_0<net.minecraft.server.v1_11_R
|
||||
fieldBits.setAccessible(true);
|
||||
getEntitySlices = net.minecraft.server.v1_11_R1.Chunk.class.getDeclaredMethod("getEntitySlices");
|
||||
getEntitySlices.setAccessible(true);
|
||||
setupAdapter(new com.boydti.fawe.bukkit.v1_11.FaweAdapter_1_11());
|
||||
Fawe.debug("Using adapter: " + adapter);
|
||||
Fawe.debug("=========================================");
|
||||
// setupAdapter(new com.boydti.fawe.bukkit.v1_11.FaweAdapter_1_11());
|
||||
// Fawe.debug("Using adapter: " + adapter);
|
||||
// Fawe.debug("=========================================");
|
||||
for (int i = 0; i < IBD_CACHE.length; i++) {
|
||||
try {
|
||||
IBD_CACHE[i] = Block.getById(i >> 4).fromLegacyData(i & 0xF);
|
||||
|
@ -162,7 +162,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
||||
} else if (count >= 4096) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
@ -172,7 +172,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Entity[] entsArr = ents.toArray(new Entity[ents.size()]);
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (Entity entity : entsArr) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
continue;
|
||||
@ -191,7 +191,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
||||
}
|
||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||
if (!entsToRemove.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (int i = 0; i < entities.length; i++) {
|
||||
Collection<Entity> ents = new ArrayList<>(entities[i]);
|
||||
for (Entity entity : ents) {
|
||||
@ -206,7 +206,7 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
|
||||
Set<UUID> createdEntities = new HashSet<>();
|
||||
Set<CompoundTag> entitiesToSpawn = this.getEntities();
|
||||
if (!entitiesToSpawn.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (CompoundTag nativeTag : entitiesToSpawn) {
|
||||
Map<String, Tag> entityTagMap = nativeTag.getValue();
|
||||
StringTag idTag = (StringTag) entityTagMap.get("Id");
|
||||
|
@ -100,7 +100,7 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
|
||||
} else if (count >= 4096) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Entity[] entsArr = ents.toArray(new Entity[ents.size()]);
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (Entity entity : entsArr) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
continue;
|
||||
@ -129,7 +129,7 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
|
||||
}
|
||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||
if (!entsToRemove.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (int i = 0; i < entities.length; i++) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (ents.isEmpty()) {
|
||||
@ -147,7 +147,7 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
|
||||
Set<UUID> createdEntities = new HashSet<>();
|
||||
Set<CompoundTag> entitiesToSpawn = this.getEntities();
|
||||
if (!entitiesToSpawn.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (CompoundTag nativeTag : entitiesToSpawn) {
|
||||
Map<String, Tag> entityTagMap = nativeTag.getValue();
|
||||
StringTag idTag = (StringTag) entityTagMap.get("Id");
|
||||
|
@ -200,7 +200,7 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
|
||||
} else if (count >= 4096) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (!ents.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
ents.clear();
|
||||
}
|
||||
}
|
||||
@ -210,7 +210,7 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
|
||||
char[] array = this.getIdArray(i);
|
||||
if (array == null || entities[i] == null || entities[i].isEmpty()) continue;
|
||||
Entity[] entsArr = ents.toArray(new Entity[ents.size()]);
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (Entity entity : entsArr) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
continue;
|
||||
@ -229,7 +229,7 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
|
||||
}
|
||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||
if (!entsToRemove.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (int i = 0; i < entities.length; i++) {
|
||||
Collection<Entity> ents = entities[i];
|
||||
if (ents.isEmpty()) {
|
||||
@ -247,7 +247,7 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
|
||||
Set<CompoundTag> entitiesToSpawn = this.getEntities();
|
||||
Set<UUID> createdEntities = new HashSet<>();
|
||||
if (!entitiesToSpawn.isEmpty()) {
|
||||
synchronized (BukkitQueue_0.adapter) {
|
||||
synchronized (BukkitQueue_0.class) {
|
||||
for (CompoundTag nativeTag : entitiesToSpawn) {
|
||||
Map<String, Tag> entityTagMap = ReflectionUtils.getMap(nativeTag.getValue());
|
||||
StringTag idTag = (StringTag) entityTagMap.get("Id");
|
||||
|
Loading…
Reference in New Issue
Block a user