Jump to content

Recommended Posts

Posted

So i have lemons that generate around the world. You break the bush, you get lemons. You then will place the lemons in a crafting grid anywhere and get lemon seeds to grow lemons.. I have managed to get lemons growing.. problem is it shows no texture(purple/black). I have the Json files correct i believe. I doubled checked them. I'll show my code, and post an image(s) of the texture in game so you can see what im talking about.

 

image of the no texture -

Block Lemon Crop code - http://pastebin.com/Q6rYecxg

Lemon Crop code - http://pastebin.com/hhkz3iig

Lemon Seed code - http://pastebin.com/1fqdnp06

 

Json file for Block States. file is called lemon_seed.json

{
    "variants": {
        "age=0": { "model": "slurpiesdongles:lemon_seed_stage_0" },
        "age=1": { "model": "slurpiesdongles:lemon_seed_stage_1" },
        "age=2": { "model": "slurpiesdongles:lemon_seed_stage_2" },
        "age=3": { "model": "slurpiesdongles:lemon_seed_stage_3" },
        "age=4": { "model": "slurpiesdongles:lemon_seed_stage_4" },
        "age=5": { "model": "slurpiesdongles:lemon_seed_stage_5" },
        "age=6": { "model": "slurpiesdongles:lemon_seed_stage_6" },
        "age=7": { "model": "slurpiesdongles:lemon_seed_stage_7" }
    }
}

 

Json file for Models/Block. File names are as wheat are except, lemon_seed_stage_0 going all the way up to 7. Only showing code for stage 0 because it's all the same except the numbers change for each stage.

{
    "parent": "block/crop",
    "textures": {
        "crop": "slurpiesdongles:blocks/lemon_seed_stage_0"
    }
}

 

Json file for Models/Item. Name is lemon_seed.json

{
    "parent": "item/generated",
    "textures": {
        "layer0": "slurpiesdongles:items/lemon_seed"
}	
}

 

Lastly i have the stage's 0-7 textured and placed into the blocks folder named lemon_seed_stage_0, going up to 7. Also have the lemon_seed texture in the texture/items folder. Not sure what i've got wrong, or to make it not read the texture, or stages, but thanks for anyones help.

 

 

 

 

 

Posted

  • Do not use the unlocalized name to determine the registry name.
  • What does your
    registerRender

    do?

  • Why are you still using
    GameRegistry.registerBlock

    ? It is deprecated.

  • your blockstate json could probably be simplified a lot by using the forge blockstate format.

 

I know I still need to fix most of this stuff.

 

My registerRender does this.

public static void registerRender(Item item) {
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
    

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.