import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.minecraft.client.render.RenderLayer;

My fabric Mod was not working properly: Both of the imports were not importing properly, it said error: package net.fabricmc.fabric.api.blockrenderlayer.v1 does not exist. I am programing in java 17 and in Minecraft 1.19 (not 1.19.1), I followed my tutorial to the letter, but this issue came up in my ModClient file.

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.lincforr.fabricmod.block.ModBlocks;
import net.minecraft.client.render.RenderLayer;

public class FabricModClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.EGGPLANT_CROP, RenderLayer.getCutout());
    }
}

I tried adding the library as it suggested however it still errored out. I looked around the fabric docs, but it just told me to add the same piece of code and did not explain why the issue my occur. I was trying to make the transparent parts of my texture for the Eggplant actually transparent, they would show up in game as a white or black background instead of being transparent here is an image of what it looks like currently.

0

There are 0 best solutions below