mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +01:00
Fix index bounds error
This commit is contained in:
parent
e7e833789a
commit
4007155b8f
@ -24,7 +24,6 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ExecutorCompletionService;
|
|
||||||
import net.minecraft.server.v1_11_R1.BiomeBase;
|
import net.minecraft.server.v1_11_R1.BiomeBase;
|
||||||
import net.minecraft.server.v1_11_R1.BiomeCache;
|
import net.minecraft.server.v1_11_R1.BiomeCache;
|
||||||
import net.minecraft.server.v1_11_R1.Block;
|
import net.minecraft.server.v1_11_R1.Block;
|
||||||
|
@ -28,7 +28,6 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||||
import java.util.concurrent.ExecutorCompletionService;
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class FaweQueue implements HasFaweQueue {
|
public abstract class FaweQueue implements HasFaweQueue {
|
||||||
@ -312,7 +311,6 @@ public abstract class FaweQueue implements HasFaweQueue {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean next() {
|
public boolean next() {
|
||||||
int amount = Settings.IMP.QUEUE.PARALLEL_THREADS;
|
int amount = Settings.IMP.QUEUE.PARALLEL_THREADS;
|
||||||
ExecutorCompletionService service = SetQueue.IMP.getCompleterService();
|
|
||||||
long time = 20; // 30ms
|
long time = 20; // 30ms
|
||||||
return next(amount, time);
|
return next(amount, time);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.sk89q.jnbt.DoubleTag;
|
|||||||
import com.sk89q.jnbt.ListTag;
|
import com.sk89q.jnbt.ListTag;
|
||||||
import com.sk89q.jnbt.StringTag;
|
import com.sk89q.jnbt.StringTag;
|
||||||
import com.sk89q.jnbt.Tag;
|
import com.sk89q.jnbt.Tag;
|
||||||
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.Vector2D;
|
import com.sk89q.worldedit.Vector2D;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
@ -104,6 +105,9 @@ public class FastWorldEditExtent extends AbstractDelegateExtent implements HasFa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseBlock getLazyBlock(int x, int y, int z) {
|
public BaseBlock getLazyBlock(int x, int y, int z) {
|
||||||
|
if (y > maxY || y < 0) {
|
||||||
|
return EditSession.nullBlock;
|
||||||
|
}
|
||||||
int combinedId4Data = queue.getCombinedId4Data(x, y, z, 0);
|
int combinedId4Data = queue.getCombinedId4Data(x, y, z, 0);
|
||||||
int id = FaweCache.getId(combinedId4Data);
|
int id = FaweCache.getId(combinedId4Data);
|
||||||
if (!FaweCache.hasNBT(id)) {
|
if (!FaweCache.hasNBT(id)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user