Java Code Examples for net.minecraft.world.chunk.storage.ExtendedBlockStorage#getData()

The following examples show how to use net.minecraft.world.chunk.storage.ExtendedBlockStorage#getData() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 6 votes vote down vote up
public int getId(ExtendedBlockStorage[] sections, int x, int y, int z) {
    if (x < 0 || x > 15 || z < 0 || z > 15) {
        return 1;
    }
    if (y < 0 || y > 255) {
        return 1;
    }
    int i = FaweCache.CACHE_I[y][z][x];
    ExtendedBlockStorage section = sections[i];
    if (section == null) {
        return 0;
    }
    char[] array = section.getData();
    int j = FaweCache.CACHE_J[y][z][x];
    return array[j] >> 4;
}
 
Example 2
Source File: SpongeQueue_1_12.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}
 
Example 3
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}
 
Example 4
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 5
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacityBrightnessPair(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return MathMan.pair16(ibd.getLightOpacity(), ibd.getLightValue());
}
 
Example 6
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}
 
Example 7
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 8
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacityBrightnessPair(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return MathMan.pair16(ibd.getLightOpacity(), ibd.getLightValue());
}
 
Example 9
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}
 
Example 10
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 11
Source File: SpongeQueue_1_12.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacityBrightnessPair(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return MathMan.pair16(ibd.getLightOpacity(), ibd.getLightValue());
}
 
Example 12
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 13
Source File: SpongeQueue_1_12.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 14
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean hasBlock(ExtendedBlockStorage section, int x, int y, int z) {
    int i = FaweCache.CACHE_J[y & 15][z & 15][x & 15];
    return section.getData()[i] != 0;
}
 
Example 15
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getCombinedId4Data(ExtendedBlockStorage ls, int x, int y, int z) {
    return ls.getData()[FaweCache.CACHE_J[y][z & 15][x & 15]];
}
 
Example 16
Source File: SpongeQueue_1_11.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacityBrightnessPair(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return MathMan.pair16(ibd.getLightOpacity(), ibd.getLightValue());
}
 
Example 17
Source File: SpongeQueue_1_11.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}
 
Example 18
Source File: SpongeQueue_1_11.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacity(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightOpacity();
}
 
Example 19
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getOpacityBrightnessPair(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return MathMan.pair16(ibd.getLightOpacity(), ibd.getLightValue());
}
 
Example 20
Source File: ForgeQueue_All.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getBrightness(ExtendedBlockStorage section, int x, int y, int z) {
    BlockStateContainer dataPalette = section.getData();
    IBlockState ibd = dataPalette.get(x & 15, y & 15, z & 15);
    return ibd.getLightValue();
}