How to change mod block luminance when right clicked?

Started by Redlarkk on Fri, 02/19/2021 - 23:19

Topic category: Help with modding (Java Edition)

Last seen on 22:47, 22. May 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to change mod block luminance when right clicked?
Fri, 02/19/2021 - 23:19

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

Last seen on 11:15, 22. May 2022
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 22:47, 22. May 2022
Joined Apr 2020
Points:

User statistics:

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

could u explain the NBT tag method to me

Last seen on 11:15, 22. May 2022
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.