How do I make a custom item texture vary according to the daytime?
Basically, I want to make a custom texture for a Minecraft item that changes according to the time of the day, much like how the clock works. However, I can't understand how does the Minecraft code do that for the clock, so I don't know how to replicate it.
Any help is much appreciated. Thanks in advance :)
Any help is much appreciated. Thanks in advance :)
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
open minecraft jar and search clock thats all files.
it also uses treshold like seen in one of json files. (treshold repeats all the way to 64)
I think if you change the line:
"type": "minecraft:model",
"model": "minecraft:item/clock\_62
change clock\_62 to your custom item name it could work tho it would brake clock. (and each\_62 represents the time based on threshold so for specific time it would be specific\_number and threshold)
you could guess based on png in example its clock\_62.png
(the important json that tells game when to load the texture aka based on time) (for full code open the .json file since its a lot of code on repeat)
"model": {
"type": "minecraft:select",
"cases": [
{
"model": {
"type": "minecraft:range_dispatch",
"entries": [
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/clock_00"
},
"threshold": 0.0
},
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/clock_01"
},
"threshold": 0.5