Jump to content

block item texture not loading?


Mystic4pheonix

Recommended Posts

block
{
    "parent": "block/cube_column",
    "textures": {
        "end": "msmt:blocks/top",
        "side": "msmt:blocks/side"
    }
}
block item
{
    "parent": "msmt:block/blockrottedwood",
    "display": {
        "thirdperson": {
            "rotation": [
                10,
                -45,
                170
            ],
            "translation": [
                0,
                1.5,
                -2.75
            ],
            "scale": [
                0.375,
                0.375,
                0.375
            ]
        }
    }
}
blockstate
{
    "variants": {
        "normal": {
            "model": "msmt:blockrottedwood"
        }
    }
}

this is the .json code for the block

Edited by Mystic4pheonix
Link to comment
Share on other sites

public class ModBlocks {
    
    public static Block vintiaplant;
    public static Block darkvintiaplant;
    public static Block rottedwood;


    public static void init() {
        vintiaplant = new Blockvintiaplant();
        darkvintiaplant = new Blockdarkvintiaplant();
        rottedwood = new BlockRottedwood();
    }
    

    public static void registerModels() {
        RegisterBModel(vintiaplant);
        RegisterBModel(darkvintiaplant);
        RegisterBModel(rottedwood);
    }
    
    @SubscribeEvent
    public static void registerBlocks(RegistryEvent.Register<Block> event) {
        event.getRegistry().registerAll(vintiaplant,darkvintiaplant,rottedwood);
    }
    
    public static void RegisterBModel (Block block){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
    }

    
}

Link to comment
Share on other sites

public class ClientProxy implements CommonProxy {

    @Override
    public void init() {
        ModBlocks.registerBlocks(what do i put here);    
        ModBlocks.registerModels();
        ModItems.registerRenders();
        ModItems.registerModels();
        GameRegistry.registerFuelHandler(new FuelHandler());
        OBJLoader.INSTANCE.addDomain(Refrence.MOD_ID);
        
    }

}
 

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.