Change a block's light level

Started by Dbok on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Sep 2023
Points:
186

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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?

Active 10 months ago
Joined Jun 2023
Points:
324

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
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]

Active 10 months ago
Joined Jun 2023
Points:
324

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
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

Active 1 year ago
Joined Nov 2023
Points:
149

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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?