Started by
Hollow Spark
on
Topic category: Help with Minecraft modding (Java Edition)
I am making a certain item that will create light when you input certain items into it and each item will release a different light value when you activate the block. I need help doing this, though. If anyone knows how to simulate this, please respond. Thank you in advance.
you could use tags
but if its a classical light source you may not be able to o it
Okay, I'll try that.
What comes to my mind is that you make a copy of the block that lights up in different intensities, one for each setting you want. Then set a procedure in all of them (the same one, just linked to all the blocks) that checks the block at x,y,z (itself) if its inventory contains one of the items you are talking about. If it does, then replace the current block for the one with the desired intensity of light, and make it inherit the inventory.
Extra tip: If you want the block to look brighter than the max of 15, you make this option spawn an invisible block (texture in black, in the vistual tab you set it up to translucent, no bounding blocks) and in the correspondent option of the previous procedure, you also make it spawn those invisible source of light at a distance from the main block (something like x+7, z, y; z-7, z, y; x, y, z+7; and x, y, z-7). Just remember to erase them in the other options.
Thanks!