6
\$\begingroup\$

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)

\$\endgroup\$
4
  • 2
    \$\begingroup\$ 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 \$\endgroup\$
    – BerickCook
    Mar 8, 2012 at 18:45
  • \$\begingroup\$ Try pulling apart this mod to see how they did it: minecraftdl.com/dynamic-lights-mod \$\endgroup\$
    – House
    Mar 8, 2012 at 23:21
  • \$\begingroup\$ I did recently find that mod, and did start taking a look at it thank you Byte \$\endgroup\$
    – Sam
    Mar 9, 2012 at 0:05
  • \$\begingroup\$ 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. \$\endgroup\$
    – Tei
    Apr 27, 2012 at 12:53

1 Answer 1

4
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .