Remove leftovers from getting rid of PlotBlocks in LocalChunk

This commit is contained in:
Alexander Krivács Schrøder 2019-05-30 13:28:19 +02:00 committed by Matt
parent b366b0d261
commit 19f8704cb4
2 changed files with 13 additions and 13 deletions

View File

@ -21,14 +21,14 @@ import org.bukkit.block.data.BlockData;
import java.util.Locale;
public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
public class BukkitLocalQueue extends BasicLocalBlockQueue {
public BukkitLocalQueue(String world) {
super(world);
}
@Override public LocalChunk<T> getLocalChunk(int x, int z) {
return (LocalChunk<T>) new BasicLocalChunk(this, x, z) {
@Override public LocalChunk getLocalChunk(int x, int z) {
return new BasicLocalChunk(this, x, z) {
// Custom stuff?
};
}
@ -69,7 +69,7 @@ public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
}
}
@Override public final void setComponents(LocalChunk<T> lc) {
@Override public final void setComponents(LocalChunk lc) {
setBaseBlocks(lc);
}
@ -81,7 +81,7 @@ public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
return getBukkitWorld().getChunkAt(x, z);
}
public void setBaseBlocks(LocalChunk<T> lc) {
public void setBaseBlocks(LocalChunk lc) {
World worldObj = Bukkit.getWorld(getWorld());
Chunk chunk = worldObj.getChunkAt(lc.getX(), lc.getZ());
chunk.load(true);
@ -152,7 +152,7 @@ public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
legacyPlotBlock.id == 0 || legacyPlotBlock.data == block.getData());
}
public void setBiomes(LocalChunk<T> lc) {
public void setBiomes(LocalChunk lc) {
if (lc.biomes != null) {
World worldObj = Bukkit.getWorld(getWorld());
int bx = lc.getX() << 4;

View File

@ -15,7 +15,7 @@ import lombok.Getter;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
public abstract class BasicLocalBlockQueue extends LocalBlockQueue {
private final String world;
private final ConcurrentHashMap<Long, LocalChunk> blockChunks = new ConcurrentHashMap<>();
@ -35,7 +35,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
@Override public abstract PlotBlock getBlock(int x, int y, int z);
public abstract void setComponents(LocalChunk<T> lc);
public abstract void setComponents(LocalChunk lc);
@Override public final String getWorld() {
return world;
@ -62,7 +62,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
return false;
}
public final boolean execute(final LocalChunk<T> lc) {
public final boolean execute(final LocalChunk lc) {
if (lc == null) {
return false;
}
@ -149,7 +149,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
return true;
}
public final void setChunk(LocalChunk<T> chunk) {
public final void setChunk(LocalChunk chunk) {
LocalChunk previous = this.blockChunks.put(chunk.longHash(), chunk);
if (previous != null) {
chunks.remove(previous);
@ -169,7 +169,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
}
public abstract class LocalChunk<B> {
public abstract class LocalChunk {
public final BasicLocalBlockQueue parent;
public final int z;
public final int x;
@ -177,7 +177,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
public BaseBlock[][] baseblocks;
public String[][] biomes;
public LocalChunk(BasicLocalBlockQueue<B> parent, int x, int z) {
public LocalChunk(BasicLocalBlockQueue parent, int x, int z) {
this.parent = parent;
this.x = x;
this.z = z;
@ -223,7 +223,7 @@ public abstract class BasicLocalBlockQueue<T> extends LocalBlockQueue {
}
public class BasicLocalChunk extends LocalChunk<PlotBlock[]> {
public class BasicLocalChunk extends LocalChunk {
public BasicLocalChunk(BasicLocalBlockQueue parent, int x, int z) {
super(parent, x, z);
baseblocks = new BaseBlock[16][];