Jump to content

Recommended Posts

Posted

I am going to be adding a custom flower to my mod, but I am not sure how to get the texture to work. I thought I had everything set up correctly but when I went into my game I had no texture. I looked inside the flower classes and the tall grass class and I think I have everything virtually the same. Is there anything wrong with my class so far?

 

package com.qwertyuiop.blocks;

import net.minecraft.block.BlockBush;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.ColorizerGrass;
import net.minecraft.world.IBlockAccess;

import com.qwertyuiop.main.Qwertyuiop;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockEnrichedGrass extends BlockBush {

public BlockEnrichedGrass() {

	super(Material.grass);

	this.setBlockName("asdsa");
	this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

}

@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister i) {

	this.blockIcon = i.registerIcon(Qwertyuiop.MODID + ":texture.png");

}

@SideOnly(Side.CLIENT)
public IIcon getIcon(int par1, int par2) {

	return this.blockIcon;

}

}

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.