Started by
BradCraft2003
on
Topic category: Help with modding (Java Edition)
I'm making a mod with my light source the Sapphire Bulb, as the name implies, I need help figuring out how to make it work like the Copper Bulb from Minecraft 1.21 since it's been available in the Minecraft Experimental Snapshots for some time now, and I know it's possible, because I managed to make it work, but only when a block next to it has a redstone pulse never both on and next to the block. I would really appreciate it if someone had the procedures I need for it to work.
Funnily enough I finished backporting these things a couple weeks back. The trick is that the copper bulb has four different states. You therefore need to make four different blocks; unlit/off, lit/off, unlit/powered, and lit/powered. Because the block can be lit and powered independently; Whenever it recieves power, you need to replace unlit blocks with the lit/powered block; or lit blocks with the unlit/powered block; and then convert to the unpowered variant when it no longer recieves power. (Essentially, the powered state behaves like a regular redstone lamp, but the lit state only changes when the block recieves power from an unpowered state.)
Okay, so I can't do it in two blockstate's? Not that it's a problem just curious.