Jump to content

Recommended Posts

Posted

I created some custom leaves for a tree in my mod. They are working fine, but they are rendering strangely. All my code for the leaves was based directly off the vanilla code. I even went through and changed all my variables to the vanilla equivalents after noticing the issues.  I switched over to vanilla textures as well. I have no clue what is causing this, and am hoping that one of you has experienced and been able to solve this issue already.

For some reason you are able to see through the leaves, kinda like an old school tnt x-ray machine. On the right are normal Oak leaves, the left are my leaves. The opaque textures for fast aren't working as well.

Fast:

gA0SOVM.png

Fancy:

7jRk11a.png

I add the block like this in my main blocks class,

	public static Block WDLeaves = new BlockWDLeaves().setBlockTextureName("wdleaves").setBlockName("wdleaves");
GameRegistry.registerBlock(WDLeaves, ItemWDLeaves.class, Reference.MODID + "_" + WDLeaves.getUnlocalizedName().substring(5));

All of the associated classes.

GenericWDLeaves:

 

  Reveal hidden contents

 

BlockWDLeaves:

 

  Reveal hidden contents

 

BlockWDLeavesBase:

 

  Reveal hidden contents

 

ItemWDLeaves

 

  Reveal hidden contents

 

Thanks for any help, as always.

Posted

Thanks for the help, i must have forgot to override it. I am however, still having problems trying to get the opaque textures to show when i have the graphics on fast.

Posted
  On 5/10/2014 at 11:22 PM, brandon3055 said:

there is a method in the leaves class called setGraphicsLevel(boolean p_150122_1_) that is used to check if fancy graphics in enabled

Ok, so i need to call this function and assign it a value? I tried what minecraft does in there Global Renderer, but im getting all kinds of static issues. How am i supposed to use this function?

Posted
  On 5/10/2014 at 11:22 PM, brandon3055 said:

there is a method in the leaves class called setGraphicsLevel(boolean p_150122_1_) that is used to check if fancy graphics in enabled

  Quote

Hi

 

There were a couple of recent posts in this forum (1-2 weeks ago?) with exactly the same symptoms, you could try a search for those

 

eg

 

http://www.minecraftforge.net/forum/index.php/topic,18775.msg94918.html#msg94918

 

-TGG

Thanks everyone, i was able to solve this issue. if anyone is interested the solution is as easy as putting this.setGraphicsLevel(Minecraft.getMinecraft().gameSettings.fancyGraphics); in your getIcon Method right before you return the icon.

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.