Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have just started making a mod for minecraft, I learned how to make items and import custom png's and have gotten all of that to work. I have been searching around the code trying to find a way to make an item being held or in the inventory give off light around the player. I do have experience coding in java, but I am not well acquainted with the minecraft code.

(This is using mcp 5.6 with modloader in minecraft 1.1 with eclipse)

share|improve this question
2  
You would probably have more luck getting the answer you seek in a Minecraft specific forum. Like the modding section of MinecraftForum: minecraftforum.net/forum/140-mod-development –  BerickCook Mar 8 '12 at 18:45
    
Try pulling apart this mod to see how they did it: minecraftdl.com/dynamic-lights-mod –  Byte56 Mar 8 '12 at 23:21
    
I did recently find that mod, and did start taking a look at it thank you Byte –  Sam Mar 9 '12 at 0:05
    
Your best bet is to create and mantain a invisible "torch satelite" that is a torch,invisible to the player, that follow the player around. This is a crappy way, and may have other side effects (the torch will melt ice?). The other way is to modify the lighting/rendering, but thats probably much harder. –  Tei Apr 27 '12 at 12:53

1 Answer 1

The simplest way would be to maintain an invisible "torch block" that follows the player.

Otherwise, your are going to have to get into the FX coding.

As far as I know, only blocks can generate light.

However here is a thought, have a look into how fire works when entity's are on fire. I'm not sure if they give off light or not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.