How can I make my custom light source block, the Sapphire Bulb, work like the Copper Bulb (minus the oxidation)?

Started by BradCraft2003 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make my custom light source block, the Sapphire Bulb, work like the Copper Bulb (minus the oxidation)?

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.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Funnily enough I finished…
Wed, 04/10/2024 - 14:15

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.)

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, so I can't do it in…
Tue, 04/23/2024 - 15:13

Okay, so I can't do it in two blockstate's? Not that it's a problem just curious.