Open rj00a opened 1 year ago
Might be more convenient to make these components smaller for the purpose of change detection.
Yes, each field that needs change detection should be its own component. Bundles can be used to make this more convenient.
How should doDaylightCycle
be implemented? Should gamerules in general just be attached to the instance or should they be entities?
I'd consider that to be vanilla functionality, which would be out of scope for valence. Do gamerules get conveyed to clients and affect them in any way? If not, gamerules are definitely out of scope.
That makes sense, so the developers that use Valence would handle the updating of the time of day themselves? Including sending that information to the players of course.
Should the time of day be a field of the InstanceInfo
struct or a component that could be spawned alongside the entity of the Instance component?
Valence would be the one sending packets. As the issue says, the desired solution is a TimeOfDay
component that goes on the entity that has the Instance
. A system inside valence would then be able to handle sending those packets.
Weather
is already implemented, you can use that for reference.
I'd consider that to be vanilla functionality, which would be out of scope for valence. Do gamerules get conveyed to clients and affect them in any way? If not, gamerules are definitely out of scope.
reducedDebugScreen or however it's called gets conveyed to clients (and actually makes a difference). Other than that I can't think of any tho
Is anyone already working on time of day? I want to take a shot at implementing it.
I initially wanted to work on it but couldn't find the time, so feel free to take over.
I'd consider that to be vanilla functionality, which would be out of scope for valence. Do gamerules get conveyed to clients and affect them in any way? If not, gamerules are definitely out of scope.
reducedDebugScreen or however it's called gets conveyed to clients (and actually makes a difference). Other than that I can't think of any tho
For completeness:
Only reducedDebugInfo
, doLimitedCrafting
and doImmediateRespawn
are sent to the Client.
All others are checked by the server internally.
It would be convenient if
Instance
had some optional components for controlling state which is typically expected to be global to the instance. This includes the time of day, whether or not time is paused (doDaylightCycle
), The world border for the instance, the weather (raining or thundering), etc.My current thinking is that we can have the following components:
TimeOfDay
Weather
WorldBorder
Might be more convenient to make these components smaller for the purpose of change detection. Not sure.