Fix forge 1.7.10 CME

This commit is contained in:
Jesse Boyd 2018-01-29 13:03:49 +11:00
parent 7136fb422e
commit 21e976ce4d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -182,22 +182,26 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
synchronized (ForgeQueue_All.class) {
nmsWorld.removeEntity(entity);
}
}
}
}
}
HashSet<UUID> entsToRemove = this.getEntityRemoves();
if (entsToRemove.size() > 0) {
for (int i = 0; i < entities.length; i++) {
Collection<Entity> ents = new ArrayList<>(entities[i]);
for (Entity entity : ents) {
if (entsToRemove.contains(entity.getUniqueID())) {
synchronized (ForgeQueue_All.class) {
nmsWorld.removeEntity(entity);
}
}
}
}
}
// Set entities
Set<UUID> createdEntities = new HashSet<>();
Set<CompoundTag> entitiesToSpawn = this.getEntities();
@ -223,9 +227,11 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
tag.removeTag("UUIDLeast");
entity.readFromNBT(tag);
entity.setPositionAndRotation(x, y, z, yaw, pitch);
synchronized (ForgeQueue_All.class) {
nmsWorld.spawnEntityInWorld(entity);
}
}
}
// Run change task if applicable
if (getParent().getChangeTask() != null) {
CharFaweChunk previous = getParent().getPrevious(this, sections, tiles, entities, createdEntities, false);
@ -247,10 +253,12 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
}
int k = FaweCache.CACHE_J[ly][lz][lx];
if (array[k] != 0) {
tile.getValue().invalidate();;
synchronized (ForgeQueue_All.class) {
tile.getValue().invalidate();
iterator.remove();
}
}
}
// Efficiently merge sections
for (int j = 0; j < sections.length; j++) {
int count = this.getCount(j);