Started by
SushyTurtle
on
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to make a block behave like a redstone lamp? i dont have any coding experiance
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to make a block behave like a redstone lamp? i dont have any coding experiance
Yes, there is. The simple way would be to create two different blocks (one on and one off) and then have a procedure switch between the two. My personal gripe with this is that then you have two blocks in the game, and it looks "messy"
The complex way to do it would be the way that Mojang made the Redstone lamps using blockstates.
If you want it to look nice, and do some custom code, you can implement blockstates. You would need one that is a Boolean (on/off) and one that would be a light value (0-15). An then one that convers a blockstates to an integer.
Here is a similar topic on this. You will need to edit your block.java code to implement the blockstates and then modify the blockstate.json in order to tell the game when to use which texture - https://mcreator.net/comment/241516
Let me know if you need any further explainations/examples
Also, once you have all that set up, you can use MCreator procedures to control the blockstates. There are blocks that say (get boolean blockstates of block at x y z) etc. And also blocks to set the blockstates.
Thank you!