Jump to content

[1.8.9] .setBlockTextureName doesn't seem to work


Xand

Recommended Posts

Hello there!

My name is Eric, and this is my first post on the forums.

 

I am creating my first mod for Minecraft, and I am starting in Minecraft 1.8.9, because I can find a lot of resources on it (plus I don't really like the new combat).

 

I am attempting to add a texture to my block I've created. The block loads into the game just fine, but the setBlockTextureName() method errors with "undefined".

 

Here is my code for my block's class:

package com.xand.xandmod.blocks;

import com.xand.xandmod.XandMod;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class CompCobbleI extends Block {

String name = "compcobblei";

public CompCobbleI() {
	super(Material.rock);
	setUnlocalizedName(XandMod.MODID + "_" + name);
	setCreativeTab(CreativeTabs.tabBlock);
	setBlockTextureName(XandMod.MODID + "_" + name); //My error is here, not with the string inside, but with the method name itself.
}

}

 

Ive read other topics about it but cannot find a correct answer. Any help is appreciated!

 

Thank you,

-Eric

Link to comment
Share on other sites

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.