use of net.tropicraft.core.common.block.TropicsFlowerBlock in project Tropicraft by Tropicraft.
the class TropicraftBlockstateProvider method flowerPot.
private void flowerPot(Supplier<? extends FlowerPotBlock> full, Supplier<? extends Block> empty, ResourceLocation particle) {
Block flower = full.get().getContent();
boolean isVanilla = flower.getRegistryName().getNamespace().equals("minecraft");
String parent = flower == Blocks.AIR ? "flower_pot" : !isVanilla ? "flower_pot_cross" : ModelProvider.BLOCK_FOLDER + "/potted_" + name(flower.delegate);
BlockModelBuilder model = models().withExistingParent(name(full), parent).texture("flowerpot", blockTexture(empty)).texture("dirt", mcLoc("block/dirt")).texture("particle", modBlockLoc("bamboo_side"));
if (!isVanilla) {
if (flower instanceof TropicsFlowerBlock) {
model.texture("plant", modLoc(ModelProvider.BLOCK_FOLDER + "/flower/" + name(flower.delegate)));
} else if (flower instanceof TallFlowerBlock) {
model.texture("plant", modLoc(ModelProvider.BLOCK_FOLDER + "/" + name(flower.delegate) + "_top"));
} else {
model.texture("plant", blockTexture(flower));
}
}
simpleBlock(full, model);
}
Aggregations