package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.data.BlockStateGenerator; import de.ellpeck.naturesaura.reg.*; import net.minecraft.block.Block; import net.minecraft.block.FlowerPotBlock; import net.minecraft.client.renderer.RenderType; import java.util.function.Supplier; public class BlockFlowerPot extends FlowerPotBlock implements ICustomBlockState, IModItem, INoItemBlock, ICustomRenderType { public BlockFlowerPot(Supplier emptyPot, Supplier block, Properties props) { super(emptyPot, block, props); ModRegistry.add(this); } @Override public void generateCustomBlockState(BlockStateGenerator generator) { generator.simpleBlock(this, generator.models() .withExistingParent(this.getBaseName(), "block/flower_pot_cross") .texture("plant", "block/" + this.getFlower().getRegistryName().getPath())); } @Override public String getBaseName() { return "potted_" + this.getFlower().getRegistryName().getPath(); } @Override public Supplier getRenderType() { return RenderType::getCutout; } }