SPIGOT-5250: Add ChunkSnapshot.contains
Dieser Commit ist enthalten in:
Ursprung
aa492e552e
Commit
b79a86edeb
@ -58,6 +58,20 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
|
||||
return worldname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(BlockData block) {
|
||||
Preconditions.checkArgument(block != null, "Block cannot be null");
|
||||
|
||||
IBlockData nms = ((CraftBlockData) block).getState();
|
||||
for (DataPaletteBlock<IBlockData> palette : blockids) {
|
||||
if (palette.a(nms)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material getBlockType(int x, int y, int z) {
|
||||
CraftChunk.validateChunkCoordinates(x, y, z);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren