Posted May 29, 201411 yr I have a custom vine working perfectly fine. It grows and it doesn't crash the game. However, it can't find the texture for it. I've tried doing the vine two different ways (first, using vanilla code; second, using the much-easier-to-do forge stuff) but it can't locate the correct texture. I wonder if there's a different way I should be initializing it? How I Register It: public static Block trumpet; //(in pre-init) trumpet = new Trumpet().setBlockName("Trumpet").setBlockTextureName("chronocube:trumpet"); GameRegistry.registerBlock(trumpet, trumpet.getUnlocalizedName().substring(5)); My Custom Vine Class: package com.REMINISC3.chronocube; import net.minecraft.block.Block; import net.minecraft.block.BlockVine; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraftforge.common.IShearable; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class Trumpet extends BlockVine implements IShearable { public Trumpet() { this.setCreativeTab(Chronocube.tabMyMod); } @Override public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("chronocube:trumpet"); } } It throws no errors and the other Blocks declared in the same way find their textures just fine. I'm a little baffled.
May 29, 201411 yr Where is your texture file located? Based on your code it should be in assets/chronocube/textures/blocks/trumpet.png. Also, I'm not sure about overriding registerBlockIcons(), because you are already setting the texture with setBlockTextureName(). It might not be needed.
May 29, 201411 yr Author Where is your texture file located? Based on your code it should be in assets/chronocube/textures/blocks/trumpet.png. Also, I'm not sure about overriding registerBlockIcons(), because you are already setting the texture with setBlockTextureName(). It might not be needed. Yep, that's exactly where it is. I went scrounging through the code to see if vine textures are called from some other folder, but no luck there. The other blocks that call for textures (in the same file, no less) can find their texture fine, but the vines just can't locate it. As for the item thing, yeah, I probably don't need it. I just realized what it was. The script that I used to export my textures made it 15 x 16. Thank you for your speedy assistance though, Nabosueco98~.
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.