Jump to content

Recommended Posts

Posted

Hi

 

you mean - items which are partially transparent (eg let 50% of the light through)?

 

Yes it's possible.  I haven't done it myself but I would suggest trying to use an IItemRenderer to add your custom rendering code for the item (turning on the appropriate alpha blending - something along the lines of         

GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);

The vanilla code has a few places which do this (although not for items?)

A bit more info on IItemRenderers here (section on Item Rendering)

http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html

 

-TGG

 

 

 

Posted

You also need to make sure your texture has an alpha layer. If you use GIMP, it usually adds one automatically when you create a new file or, if it didn't, you can add one.

 

Once you have an alpha layer, in the 'Layers, Channels, Paths,...' pane (shows up on the right-hand side for me), just above the 'Lock' box there is a slider that says 'Opacity'. Sliding it to the left will make your texture more transparent, which you can then export/save as a .png file.

 

From there you can do what TGG said and use the openGL BLEND methods to render your transparent texture in a custom IItemRenderer. Just be sure to disable blend when you're done.

Posted

java.lang.NullPointerException

  at denbukki.indestructibleTools.proxys.ClientProxy.register(ClientProxy.java:15)

 

As I told someone else:

 

Null pointer exception

At line 15 in yourClientProxy.

 

Go there.

 

Figure out why.

 

You kept walking around the door that is locked trying to figure out why you aren't getting inside instead of using the key, like a normal person.

 

This is basic Java and we are not here to help you with basic Java.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

nvm figgerd it out but still no transparentsy

Just saying that it's not working isn't going to get you anywhere, because we cannot divine what is in your code that's causing it to fail. No code = no help. Simple as that.

to be honest i dont really have a good code i just did something pls help

Posted

I'm getting some strong negative energy from your workspace.  Try facing east instead.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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