implement new terrain generator, cave generator, tree generator, implement big tree generator, improve light update performance
This commit is contained in:
@@ -35,8 +35,12 @@ export default class Block {
|
||||
return this.textureSlotId;
|
||||
}
|
||||
|
||||
getTransparency() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
isTransparent() {
|
||||
return this.getOpacity() < 1.0;
|
||||
return this.getTransparency() > 0.0;
|
||||
}
|
||||
|
||||
shouldRenderFace(world, x, y, z, face) {
|
||||
|
||||
@@ -22,14 +22,14 @@ export class BlockRegistry {
|
||||
Block.sounds.sand = new Sound("sand", 1.0);
|
||||
|
||||
// Blocks
|
||||
Block.STONE = new BlockStone(1, 0);
|
||||
Block.GRASS = new BlockGrass(2, 1);
|
||||
Block.DIRT = new BlockDirt(3, 2);
|
||||
Block.WOOD = new BlockWood(5, 10);
|
||||
Block.LOG = new BlockLog(17, 4);
|
||||
Block.LEAVE = new BlockLeave(18, 6);
|
||||
Block.WATER = new BlockWater(9, 7);
|
||||
Block.SAND = new BlockSand(12, 8)
|
||||
Block.TORCH = new BlockTorch(50, 9)
|
||||
BlockRegistry.STONE = new BlockStone(1, 0);
|
||||
BlockRegistry.GRASS = new BlockGrass(2, 1);
|
||||
BlockRegistry.DIRT = new BlockDirt(3, 2);
|
||||
BlockRegistry.WOOD = new BlockWood(5, 10);
|
||||
BlockRegistry.LOG = new BlockLog(17, 4);
|
||||
BlockRegistry.LEAVE = new BlockLeave(18, 6);
|
||||
BlockRegistry.WATER = new BlockWater(9, 7);
|
||||
BlockRegistry.SAND = new BlockSand(12, 8)
|
||||
BlockRegistry.TORCH = new BlockTorch(50, 9)
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,10 @@ export default class BlockWater extends Block {
|
||||
return 0.01;
|
||||
}
|
||||
|
||||
getTransparency() {
|
||||
return 0.2;
|
||||
}
|
||||
|
||||
isSolid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user