mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
New block properties and lua functions
This commit is contained in:
parent
9e1a7213c7
commit
9ebbe1029d
7 changed files with 40 additions and 6 deletions
|
|
@ -97,6 +97,13 @@ bool Chunks::isSolid(int x, int y, int z) {
|
|||
return contentIds->getBlockDef(v->id)->rt.solid;
|
||||
}
|
||||
|
||||
bool Chunks::isReplaceable(int x, int y, int z) {
|
||||
voxel* v = get(x, y, z);
|
||||
if (v == nullptr)
|
||||
return false;
|
||||
return contentIds->getBlockDef(v->id)->replaceable;
|
||||
}
|
||||
|
||||
ubyte Chunks::getLight(int x, int y, int z, int channel){
|
||||
x -= ox * CHUNK_W;
|
||||
z -= oz * CHUNK_D;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue