Search in sources :

Example 1 with BongoDrumBlock

use of net.tropicraft.core.common.block.BongoDrumBlock in project Tropicraft by Tropicraft.

the class TropicraftBlockstateProvider method bongo.

private void bongo(Supplier<? extends BongoDrumBlock> block) {
    BongoDrumBlock.Size size = block.get().getSize();
    AABB bb = size.shape.bounds();
    simpleBlock(block.get(), models().cubeBottomTop(name(block), modBlockLoc("bongo_side"), modBlockLoc("bongo_bottom"), modBlockLoc("bongo_top")).element().from((float) bb.minX * 16, (float) bb.minY * 16, (float) bb.minZ * 16).to((float) bb.maxX * 16, (float) bb.maxY * 16, (float) bb.maxZ * 16).allFaces((dir, face) -> face.texture(dir.getAxis().isHorizontal() ? "#side" : dir == Direction.DOWN ? "#bottom" : "#top").cullface(dir.getAxis().isVertical() ? dir : null)).end());
}
Also used : BongoDrumBlock(net.tropicraft.core.common.block.BongoDrumBlock) AABB(net.minecraft.world.phys.AABB)

Aggregations

AABB (net.minecraft.world.phys.AABB)1 BongoDrumBlock (net.tropicraft.core.common.block.BongoDrumBlock)1