ACE Tuesday #03 "Project & Stuff"

I just want to add a little clarification about my water signal component. Basically, this is something you can attach to an entity and optionally supply it with a region (otherwise it uses the entity’s collision or destination region) to watch for changes in the presence of water/waterfalls or in their volume. When a change happens, an event is triggered that can be listened to by other components/services to then perform some effect or function.

In order to not reduce performance too much, these checks are instigated by a water signal service that spreads them out into 20 “buckets” so that each check will only happen once every ~2 seconds. Individual water signal components can be marked as “urgent” and checked every tick of the hydrology service instead.

Another performance tweak I’m planning on making is an option to specify individual types of checking instead of always doing all four of those (e.g., if you only care about the existence of water for flood checks, you only care about whether water exists in that region; you don’t care how much).

So this isn’t all that similar to Minecraft redstone, but it could allow for a similar (albeit far slower) type of system using water: Anything you wanted to “power” (like a gate, pump, piston, or lamp), could have a water signal component that checks immediately adjacent to it for presence of water and then its “redstone” component would listen for the right event and switch the entity on or off accordingly. (You could even make a special wet/dry stone that listens for water on one side of it and toggles on/off or wet/dry if it senses it there; or you could have wetstones that only activate as long as the water level is low enough, or drystones that only activate as long as the water level is high enough.) And I’m sure future modders could make a more extensive system, but hopefully these tools can help at least with the basic functionality of making water a more useful and meaningful resource/system.

9 Likes