Change a block's light level

Started by Dbok on

Topic category: Help with modding (Java Edition)

Last seen on 17:10, 11. Apr 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Change a block's light level

I'd like to create a block that behaves similarly to a Redstone Lamp: light level 15 when powered, 0 when not. The block already has a functioning blockstate called "powered", how can I set the light level based off of that?

Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In one of the blocks trigger…
Mon, 09/25/2023 - 02:58

In one of the blocks trigger, for example, "block is right clicked on", create a procedure. Under "block management" there is a code block for "set integer property ["powered"] of block to [number 1-15]

Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There are also "get integer…
Mon, 09/25/2023 - 03:01

There are also "get integer property" blocks as well so you can test for the blockstate

Last seen on 16:09, 3. Nov 2023
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you know u can just copy the…
Fri, 11/03/2023 - 16:11

you know u can just copy the lamp and change the texture and name and then create a recipe for it right?