Posted October 11, 20204 yr I want to make it so that when I right-click on a block, it changes the texture of the block. There will be more than two textures that will be cycled through and I want to know how to make a blockstate for something like this. Or if there's an existing one that works for this or something it would be a big help.
October 11, 20204 yr Have you tried looking at vanilla blocks that have similar behaviour? For example the redstone lamp, that change its texture based on its state (lit = false/true), or the respawn anchor (1.16) that has 5 possible different states depending on its charge. Keep in mind that the number of states a block can assume is limited. For anything that could exceed that limit you will need a tile entity. Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
October 11, 20204 yr Author 4 minutes ago, diesieben07 said: Look at how vanilla makes block states use different models, (e.g. look at FenceBlock). I dont want the blockstate to be dependent on direction. 4 minutes ago, Beethoven92 said: Have you tried looking at vanilla blocks that have similar behaviour? For example the redstone lamp, that change its texture based on its state (lit = false/true), or the respawn anchor (1.16) that has 5 possible different states depending on its charge. Keep in mind that the number of states a block can assume is limited. For anything that could exceed that limit you will need a tile entity. Yeah I think NOTE_0_24 which is for the different note pitches is most like what im trying to do. It has multiple states that cycle. I just dont know how it affects the note color and I think that would be what I need.
October 11, 20204 yr Author 7 minutes ago, diesieben07 said: The note color here has nothing to do with the block model. You need a different model per block state, which is exactly what the fence does. Ok I know I need a different model but I don't understand why the fence would be a good reference. It does change the model but I dont think the directional boolean properties help since all my block would do is depend on if the player right-clicked.
October 11, 20204 yr Author 3 hours ago, Beethoven92 said: Keep in mind that the number of states a block can assume is limited. For anything that could exceed that limit you will need a tile entity. What's the limit?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.