schem list is still broken

clickEvent and hoverEvent don't seem to work, I'm probably doing something wrong
This commit is contained in:
Jesse Boyd
2019-10-23 15:35:04 +01:00
parent d904270a3d
commit 8768085479
42 changed files with 394 additions and 256 deletions

View File

@ -670,7 +670,7 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
}
@Override
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
int bx = chunk.getX() << 4;
int bz = chunk.getZ() << 4;
int tx = bx + 15;

View File

@ -265,7 +265,17 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
contains(tx, ty, tz);
}
default IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
default boolean containsChunk(int chunkX, int chunkZ) {
int bx = chunkX << 4;
int bz = chunkZ << 4;
int tx = bx + 15;
int tz = bz + 15;
BlockVector3 min = getMinimumPoint();
BlockVector3 max = getMaximumPoint();
return tx >= min.getX() && bx <= max.getX() && tx >= min.getZ() && bx <= max.getZ();
}
default IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
int bx = chunk.getX() << 4;
int bz = chunk.getZ() << 4;
int tx = bx + 15;

View File

@ -155,7 +155,7 @@ public class RegionIntersection extends AbstractRegion {
}
@Override
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
int bx = chunk.getX() << 4;
int bz = chunk.getZ() << 4;
int tx = bx + 15;
@ -164,7 +164,7 @@ public class RegionIntersection extends AbstractRegion {
BlockVector3 regMin = region.getMinimumPoint();
BlockVector3 regMax = region.getMaximumPoint();
if (tx >= regMin.getX() && bx <= regMax.getX() && tz >= regMin.getZ() && bz <= regMax.getZ()) {
return region.processBatch(chunk, get, set);
return region.processSet(chunk, get, set);
}
}
return null;