Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

 

 

 

 

 

  • Author

  • 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"));
    

  • Author

Use ModelLoader.setCustomModelResourceLocation instead. And again, do not use the unlocalized name like that.

 

will this fix my issue with the seeds not showing there textures when placed and grown?

  • Author

No, that is an issue with the block models, not the item models.

 

okay. What do i need to change to fix the block models for the seeds to show up?

  • Author

Oh, thank you that fixed the issue! Now could you explain above what you meant by the other things I needed to fix? You said something about my unlocalized name and was confused by what you mean.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.