content: package com.github.alexthe666.iceandfire.item;
  
  import com.github.alexthe666.iceandfire.client.render.tile.IceAndFireTEISR;
  import net.minecraft.client.Minecraft;
  import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
  import net.minecraft.world.item.BlockItem;
  import net.minecraft.world.level.block.Block;
  import net.minecraftforge.client.IItemRenderProperties;
  import net.minecraftforge.common.util.NonNullLazy;
  
  import java.util.function.Consumer;
  
  public class BlockItemWithRender extends BlockItem {
      public BlockItemWithRender(Block p_40565_, Properties p_40566_) {
          super(p_40565_, p_40566_);
      }
  
      @Override
      public void initializeClient(Consumer<IItemRenderProperties> consumer) {
          consumer.accept(new IItemRenderProperties() {
              static final NonNullLazy<BlockEntityWithoutLevelRenderer> renderer = NonNullLazy.of(() -> new IceAndFireTEISR(Minecraft.getInstance().getBlockEntityRenderDispatcher(), Minecraft.getInstance().getEntityModels()));
  
              @Override
              public BlockEntityWithoutLevelRenderer getItemStackRenderer() {
                  return renderer.get();
              }
          });
      }
  
  }
  