How to change mod block luminance when right clicked?

Started by Redlarkk on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to change mod block luminance when right clicked?

Hi, i want to add a lamp block to my mod that has colour variations and a player can turn on and off by right clicking. I want to know how to do this without having to create two separate blocks for each colour? if it's even possible

Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well you will you need to do…
Fri, 02/19/2021 - 23:38

Well you will you need to do some custom coding. You will need to create a block state for your block and change it when player interacts with it. 

I can explain how to make block state controllable with NBT tags(You will be able to change them just by changing the NBT tags through your procedures)

or... I can explain how to make without any procedures.

You will need to know a little bit of java for both

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
could u explain the NBT tag…
Fri, 02/19/2021 - 23:51

could u explain the NBT tag method to me

Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Of course! But not now sorry…
Sat, 02/20/2021 - 00:46

Of course! But not now sorry :/ It’s very late in my country.