Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 50 additions & 7 deletions .github/workflows/neoforge-1.21.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ on:
pull_request:
branches:
- main
- gui/controller-layout
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
flavor: [standalone, create]
runs-on: ubuntu-latest
env:
CREATE_ARGS: ${{ matrix.flavor == 'create' && '-PwithCreate' || '' }}
permissions:
contents: read
steps:
Expand All @@ -35,14 +42,16 @@ jobs:
sha256sum --check <<'HASH'
70930ad6b943d9a359ddb573450f5114a6a54a676e32c1895f6eb4d2cd634a33 libs/StreamsReflowing-1.21.1-neoforge-2.16.2.jar
HASH
- name: Fetch verified optional Create compile fixture
run: python3 tools/fetch_create.py
- name: Compile and package addon
run: |
chmod +x gradlew
./gradlew --no-daemon clean build
./gradlew --no-daemon $CREATE_ARGS clean build
- name: Upload test JAR
uses: actions/upload-artifact@v4
with:
name: flow-control-0.1.7-neoforge-1.21.1
name: flow-control-0.2.2-neoforge-1.21.1-${{ matrix.flavor }}
path: build/libs/flow-control-*.jar
if-no-files-found: error

Expand All @@ -52,7 +61,7 @@ jobs:
echo 'eula=true' > run/eula.txt
echo 'forceBakedFluid=true' > run/config/streamsreflowing.properties
printf 'level-type=minecraft:flat\ngenerate-structures=false\nonline-mode=false\nview-distance=2\nsimulation-distance=2\n' > run/server.properties
timeout 300 ./gradlew --no-daemon -Dstreamcontrol.integrationTest=true runServer
timeout 300 ./gradlew --no-daemon -Dstreamcontrol.integrationTest=true $CREATE_ARGS runServer
python3 - <<'CHECK'
import json
data=json.load(open('run/streamcontrol-integration-results.json'))
Expand All @@ -63,24 +72,58 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: flow-control-0.1.7-neoforge-1.21.1-checks
name: flow-control-0.2.2-neoforge-1.21.1-${{ matrix.flavor }}-checks
path: |
run/streamcontrol-integration-results.json
run/logs/latest.log

- name: Capture the actual controller GUIs
run: |
mkdir -p run-client
printf 'onboardAccessibility:false\nguiScale:3\nfullscreen:false\n' > run-client/options.txt
timeout 360 xvfb-run -a ./gradlew --no-daemon -Dstreamcontrol.uiPreview=true runClient
printf 'onboardAccessibility:false\nguiScale:3\ntutorialStep:none\nfullscreen:false\n' > run-client/options.txt
timeout 360 xvfb-run -a ./gradlew --no-daemon -Dstreamcontrol.uiPreview=true $CREATE_ARGS runClient
test -s run-client/screenshots/flow-control-current-generator.png
test -s run-client/screenshots/flow-control-stillwater-anchor.png
test -s run-client/screenshots/flow-control-redstone-paused.png
test -s run-client/screenshots/flow-control-automation.png
test -s run-client/screenshots/flow-control-flow-sensor.png
test -s run-client/screenshots/flow-control-mooring-post.png
test -s run-client/screenshots/flow-control-block-models.png
test -s run-client/screenshots/flow-control-mechanical-controller.png
- name: Upload GUI screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: flow-control-0.1.7-client-preview
name: flow-control-0.2.2-${{ matrix.flavor }}-client-preview
path: |
run-client/screenshots/*.png
run-client/logs/latest.log

- name: Exercise real client gameplay against a dedicated server
run: |
rm -f run/client-test-ready
./gradlew --no-daemon -Dstreamcontrol.clientTestServer=true $CREATE_ARGS runServer > client-test-server.log 2>&1 &
SERVER_PID=$!
trap 'kill "$SERVER_PID" $(jobs -pr) 2>/dev/null || true' EXIT
for attempt in $(seq 1 120); do
if test -s run/client-test-ready; then break; fi
if ! kill -0 "$SERVER_PID" 2>/dev/null; then tail -n 50 client-test-server.log; exit 1; fi
sleep 1
done
test -s run/client-test-ready
timeout 600 xvfb-run -a ./gradlew --no-daemon -Dstreamcontrol.clientIntegrationTest=true $CREATE_ARGS runClient
python3 - <<'CHECK'
import json
data=json.load(open('run-client/streamcontrol-client-results.json'))
assert data.get('passed') is True, data
CHECK
- name: Upload live client results and screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: flow-control-0.2.2-${{ matrix.flavor }}-client-gameplay
path: |
run-client/streamcontrol-client-results.json
run-client/screenshots/gameplay-*.png
run-client/logs/latest.log
client-test-server.log
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ validation/
Thumbs.db

run-client/

libs/create-compile/
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
![Flow Control](https://i.imgur.com/JGT2lvz.png)

## 0.2.2 — Verified Water Engineering and Version Ports

- Fixed controller and utility block interactions so Copy, Paste and Link reach the Calibrator instead of opening the normal configuration screen.
- Carried the redesigned, centered interfaces and water-engineering functions to the existing Minecraft/loader ports.
- Updated every port to the exact Streams Reflowing 2.16.2 dependency and checked its current-grid and surface-particle APIs against the matching JAR.
- Preserved old wand items, legacy edits and controller settings; clients and servers must use matching 0.2.2 builds.
- Added real client/server checks for GUI Apply and synchronization, all Calibrator modes, links and unlinking, profiles, redstone switching, vertical sensors and comparator output, mooring release/recapture and real-player boarding.
- Verified the optional mechanical controller through actual Create motor input, reversal and stopping. Create's normal water-wheel RPM behavior is unchanged.
- Adapted modern ports to their own persistence, comparator and rendering APIs, including world-bound item components and 26.3 geometry submission.

The complete feature changelog and exact supported dependency matrix are supplied with the verified release bundle.

## 0.2.1 — Barrel and Create Model Refinement

- Kept the original control lid on the Mechanical Current Generator and replaced its entire body with native Create Andesite Casing textures.
- Added a recessed bottom shaft socket and matched the inventory shaft to Create's actual shaft geometry and end texture.
- Rebuilt the Mooring Post as a compact barrel with straight staves, native barrel hoops, a wooden lid and subtly chamfered corners.
- Removed the old recolored machine textures from the Mooring Post.
- Preserved all water-control, sensor, mooring and Create behavior.


## 0.2.0 — Water Engineering

- Repurposed the Flow Wand as the Flow Calibrator: inspect currents, show horizontal/vertical reach, copy and paste settings, and link controllers.
- Preserved the existing tool registry ID, controller settings and legacy wand regions; added a cleanup mode for old edits.
- Added two saved controller profiles with directed, reversed, calm and natural-flow actions.
- Added analog redstone strength, powered reversal, profile switching and an always-active mode alongside the original power-to-pause behavior.
- Added configurable vertical reach to controller profiles.
- Added Flow Sensors with independent horizontal and vertical ranges, comparator output for strength/direction/boats, and empty-boat filtering.
- Added Mooring Posts that secure one empty boat and release it when boarded, powered, disabled or removed.
- Added optional Create support: Mechanical Current Generator, real bottom-shaft input, RPM-based strength, reversal and stress handling.
- Reused the existing block model family and pixel patterns; added steel-blue sensors, wooden mooring posts and an andesite base for the Create variant.
- Added matching Automation, sensor and mooring screens, live utility status, survival recipes and item descriptions.
- Updated networking for the new settings. Client and server must use matching 0.2.0 builds.
- Verified NeoForge 1.21.1 / Java 21 / Streams Reflowing 2.16.2, both with and without Create 6.0.10. Other ports are unchanged.


## 0.1.7

- Removed the header corner rivets.
Expand Down
53 changes: 20 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,34 @@

Shape currents and create calm water around docks, canals and builds. An addon for **Streams Reflowing**, available for NeoForge, Forge and Fabric.

## Versions and downloads
## Water Engineering — 0.2.1

The **0.1.7 preview for NeoForge 1.21.1** updates compatibility to **Streams Reflowing 2.16.2** and gives both controllers a distinct slate-and-copper layout. The Current Generator has a centered eight-way navigation chart; the Stillwater Anchor has a central anchor chart and symmetric range readouts. Header rivets are removed. The preview source and its build checks are on [`gui/controller-layout`](https://github.com/Mikaaah/Flow-Control/tree/gui/controller-layout).
Turn waterways into configurable transport and docking systems. The Flow Calibrator inspects currents, displays reach, copies settings and links controllers. Two saved profiles add analog redstone control, reversal and automatic switching. Flow Sensors detect current strength, direction or boats through configurable horizontal and vertical ranges. Mooring Posts secure empty boats and release them when boarded or powered.

The published **0.1.5** downloads below remain available for all eight versions and require Streams Reflowing **2.15.2**.
With **Create** installed, the **Mechanical Current Generator** accepts a bottom shaft: RPM sets strength, rotation direction reverses flow, and stopped or overstressed drives release their override. The standard controllers, sensors, posts and Calibrator work without Create.

| Minecraft | Loader | Streams Reflowing | Java | Download |
| --- | --- | --- | --- | --- |
| 1.21.1 | NeoForge | 2.15.2 | 21 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/main/downloads/flow-control-0.1.5-neoforge-1.21.1.jar) |
| 1.20.1 | Fabric | 2.15.2 | 17 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/fabric/1.20.1/downloads/flow-control-0.1.5-fabric-1.20.1.jar) |
| 1.21.1 | Fabric | 2.15.2 | 21 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/fabric/1.21.1/downloads/flow-control-0.1.5-fabric-1.21.1.jar) |
| 26.1.2 | Fabric | 2.15.2 | 25 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/fabric/26.1.2/downloads/flow-control-0.1.5-fabric-26.1.2.jar) |
| 1.20.1 | Forge | 2.15.2 | 17 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/forge/1.20.1/downloads/flow-control-0.1.5-forge-1.20.1.jar) |
| 1.21.11 | NeoForge | 2.15.2 | 21 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/neoforge/1.21.11/downloads/flow-control-0.1.5-neoforge-1.21.11.jar) |
| 26.1.2 | NeoForge | 2.15.2 | 25 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/neoforge/26.1.2/downloads/flow-control-0.1.5-neoforge-26.1.2.jar) |
| 26.3 | NeoForge | 2.15.2 | 25 | [JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/neoforge/26.3/downloads/flow-control-0.1.5-neoforge-26.3.jar) |
The existing controller model family is retained, with steel-blue sensor colors, barrel-style mooring posts and a full andesite casing body beneath the original mechanical control lid. Existing Flow Wands become Calibrators; saved controller settings and old edits are preserved.

Install matching JARs on client and server. Fabric also requires Fabric API.
All eight builds and dedicated-server regression suites passed, including eight-way flow, equal diagonal speed, persistence and packet checks; the NeoForge 1.21.1 client was launched and all three controller-screen states were visually checked.
| Minecraft | Loader | Java | Streams Reflowing | Optional Create | Download |
| --- | --- | --- | --- | --- | --- |
| 1.21.1 | NeoForge 21.1.219+ within 21.1 | 21 | 2.16.2 | Tested with 6.0.10 | [0.2.1 JAR](https://github.com/Mikaaah/Flow-Control/raw/refs/heads/feature/water-engineering/downloads/flow-control-0.2.1-neoforge-1.21.1.jar) |

## Make water work for your build

| Item | What it does |
| --- | --- |
| **Flow Wand** | Direct flow, still water or restore natural flow in a chosen area. |
| **Current Generator** | Maintain a directional current; rotate its top arrow to steer the flow. |
| **Stillwater Anchor** | Calm currents around a dock or mooring. |

All three items have survival recipes. Right-click either controller to open its settings screen: adjust radius (with diameter and vertical reach), choose connected-water-only behavior, and set flow speed and direction on the Current Generator. Redstone power disables a controller. Break it to restore the underlying current.

## Install and start
[Controls and behavior](docs/WATER-ENGINEERING.md) · [Feature branch](https://github.com/Mikaaah/Flow-Control/tree/feature/water-engineering) · [Build and regression checks](https://github.com/Mikaaah/Flow-Control/actions/runs/41593515484)

Choose a matching Minecraft and loader build from the table above, then install this addon and **Streams Reflowing 2.15.2** on client and server. Use the Java version listed for that build; Fabric also requires Fabric API. **UltraTerraForged is not required.**
The 0.2.1 feature update currently targets NeoForge 1.21.1. Earlier downloads and other loader branches remain unchanged. Use matching client/server versions.

For a dock, place a Stillwater Anchor under or beside the water within four blocks of the boats. Right-click to adjust its radius; if there are multiple nearby ponds, enable *Connected water only*. Use the Flow Wand for temporary or shaped areas.

Flow changes velocity rather than moving water blocks or changing river terrain. Calm water removes current-induced drift; it does not prevent steering, collisions or momentum.

## Guides
## Make water work for your build

[Items and controls](https://github.com/Mikaaah/Flow-Control/wiki/Items-and-Controls) · [Overlapping areas](https://github.com/Mikaaah/Flow-Control/wiki/Overlapping-Areas) · [Configuration](https://github.com/Mikaaah/Flow-Control/wiki/Configuration) · [Troubleshooting](https://github.com/Mikaaah/Flow-Control/wiki/Troubleshooting)
| Tool or block | Purpose |
| --- | --- |
| Flow Calibrator | Inspect currents, preview reach, copy/paste settings and link controllers. |
| Current Generator | Maintain an eight-way current with configurable profiles and redstone behavior. |
| Stillwater Anchor | Calm water around docks and switch between calm and natural water. |
| Flow Sensor | Measure strength, compass direction or boats above, below and around the sensor. |
| Mooring Post | Secure one empty boat; release it when boarded or powered. |
| Mechanical Current Generator | Optional Create shaft-driven variant with RPM and stress support. |

Right-click blocks to configure them. Sneak-use the Calibrator in the air to switch modes. All tools and blocks have survival recipes; the mechanical recipe is available only with Create.

## Credits and license

Expand Down
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java-library'
id 'net.neoforged.moddev' version '2.0.148'
}
version = '0.1.7'
version = '0.2.2'
group = 'nl.townsandkingdoms.streamcontrol'
base.archivesName = 'flow-control'
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
Expand All @@ -18,19 +18,27 @@ neoForge {
programArgument '--height'
programArgument '720'
systemProperty 'streamcontrol.uiPreview', System.getProperty('streamcontrol.uiPreview', 'false')
systemProperty 'streamcontrol.clientIntegrationTest', System.getProperty('streamcontrol.clientIntegrationTest', 'false')
jvmArgument '-Xmx2G'
}
server {
server()
programArgument '--nogui'
jvmArgument '-Xmx3G'
jvmArgument '-Xmx2G'
gameDirectory = file('run')
systemProperty 'streamcontrol.integrationTest', System.getProperty('streamcontrol.integrationTest', 'false')
systemProperty 'streamcontrol.clientTestServer', System.getProperty('streamcontrol.clientTestServer', 'false')
}
}
mods { streamcontrol { sourceSet sourceSets.main } }
}
dependencies {
implementation files('libs/StreamsReflowing-1.21.1-neoforge-2.16.2.jar')
compileOnly files('libs/create-1.21.1-6.0.10.jar')
compileOnly fileTree('libs/create-compile') { include '*.jar' }
if (providers.gradleProperty('withCreate').isPresent()) {
runtimeOnly files('libs/create-1.21.1-6.0.10.jar')
}
// Optional local compatibility test fixtures, never included in the published jar.
if (providers.gradleProperty('withUtf').isPresent()) {
runtimeOnly files('libs/ultraterraforged-1.0.2+1.21.1-neoforge.jar',
Expand All @@ -40,4 +48,4 @@ dependencies {
tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8'; options.release = 21 }
tasks.named('jar') { from('LICENSE') }

tasks.named("jar") { archiveFileName = "flow-control-0.1.7-neoforge-1.21.1.jar" }
tasks.named("jar") { archiveFileName = "flow-control-0.2.2-neoforge-1.21.1.jar" }
Loading
Loading