2
(resourcepack) Block changing texture based on time
Hello,
I want to make a Minecraft block (i.e. firefly bush) change textures depending on the time of day; at day the bush would be a plain bush, and at night the bush would have the fireflies in it. I tried to look at daylight detectors for their NBT data, but they rely on a different property. Firefly bushes also have no properties and I can't find the code which triggers particles to come out at night, so I would have to add a NBT property directly to the .json, but I don't know how to execute the time-of-day blockstate.
Any tips? Or other examples?
I want to make a Minecraft block (i.e. firefly bush) change textures depending on the time of day; at day the bush would be a plain bush, and at night the bush would have the fireflies in it. I tried to look at daylight detectors for their NBT data, but they rely on a different property. Firefly bushes also have no properties and I can't find the code which triggers particles to come out at night, so I would have to add a NBT property directly to the .json, but I don't know how to execute the time-of-day blockstate.
Any tips? Or other examples?
1
Interestin question to which I lack the technical knowledge to be much help, but which I'll be following as this seems like it could be usefulk in a number of cases.
If you're just interested in firefly particles being linked to sky light level (which is what a daylight detector checks), you might shift to changing block state when the block is powered (pistons or RS-lamps being examples).
If the actual ingame time-of-day is required, the Clock item would seem to be best example from which to start.
Probably not a great help, but hopefully a few breadcrumbs…
If you're just interested in firefly particles being linked to sky light level (which is what a daylight detector checks), you might shift to changing block state when the block is powered (pistons or RS-lamps being examples).
If the actual ingame time-of-day is required, the Clock item would seem to be best example from which to start.
Probably not a great help, but hopefully a few breadcrumbs…
