-
Notifications
You must be signed in to change notification settings - Fork 2
Network Info Panel_EN
The Network Info Panel is the GTSWN multi-block display panel, composed of a main panel and extender panels that can be stitched into any rectangular size. It visualizes wireless grid energy trends across 8 nested time windows: 5 minutes / 1 hour / 8 hours / 24 hours / 7 days / 1 month (28 d) / 3 months (84 d) / 1 year (336 d).
- Multi-block display panel; main panel + extender panels form any rectangular size
- 8 time windows: 5m / 1h / 8h / 24h / 7d / 1M / 3M / 1Y (natural-ratio inflow chain 12→8→3→7→4→3→4)
- Uses Fritsch-Carlson monotone cubic Hermite spline for smooth rendering
- Supports per-player UUID data sharing across multiple screens
- 3 tabs: EU Network / AE Chart / AE Realtime Monitor
- Configurable screen background color, spline smoothing, display mode, etc.
- Dataset persisted; breaking the block does not lose data immediately
Craft in a crafting table using a cross structure (center = Wireless Energy Monitor):
| Slot | Col 1 | Col 2 | Col 3 |
|---|---|---|---|
| Row 1 | LV Sensor | Glass | LV Sensor |
| Row 2 | Glass | Wireless Energy Monitor | Glass |
| Row 3 | LV Sensor | Glass | LV Sensor |
Materials: LV Sensor ×4 + Glass ×4 + Wireless Energy Monitor ×1
Craft in a crafting table using a cross structure (center = Screen Cover):
| Slot | Col 1 | Col 2 | Col 3 |
|---|---|---|---|
| Row 1 | LV Receiver | Glass | LV Receiver |
| Row 2 | Glass | Screen Cover | Glass |
| Row 3 | LV Receiver | Glass | LV Receiver |
Materials: LV Receiver ×4 + Glass ×4 + Screen Cover ×1 (outputs 2 extenders)
Glass wildcard: The recipe uses
Blocks.glasswith meta=32767 wildcard, accepting both plain glass and stained glass.
The Network Info Panel supports 8 time windows, each a 61-point FIFO:
| Window | Points | Sample Interval | Total Duration | Source |
|---|---|---|---|---|
| 5 minutes | 61 | 100 ticks (5 s) | 300 s | Original samples |
| 1 hour | 61 | 1200 ticks (60 s) | 3600 s | Inflow from 5m means |
| 8 hours | 61 | 9600 ticks (480 s) | 28800 s | Inflow from 1h means |
| 24 hours | 61 | 28800 ticks (1440 s) | 86400 s | Inflow from 8h means |
| 7 days | 61 | 201600 ticks (10080 s) | 604800 s | Inflow from 24h means |
| 1 month (28 d) | 61 | 806400 ticks (40320 s) | 2419200 s | Inflow from 7d means |
| 3 months (84 d) | 61 | 2419200 ticks (120960 s) | 7257600 s | Inflow from 1M means |
| 1 year (336 d) | 61 | 9676800 ticks (483840 s) | 29030400 s | Inflow from 3M means |
Note: The 1h / 8h / 24h / 7d / 1M / 3M / 1Y windows are triggered by the inflow counter chain, not independent sampling. Each window's sample points are computed from the mean of the last N points in the upstream window.
The 8 time windows are triggered via a nested counter chain with non-uniform ratios, derived naturally from the duration ratio of adjacent windows. Each level's samples are computed from the upstream window's mean:
- 5m → 1h: every 12 5m samples triggers 1 1h sample (3600s / 300s = 12)
- 1h → 8h: every 8 1h samples triggers 1 8h sample (28800s / 3600s = 8)
- 8h → 24h: every 3 8h samples triggers 1 24h sample (86400s / 28800s = 3)
- 24h → 7d: every 7 24h samples triggers 1 7d sample (604800s / 86400s = 7)
- 7d → 1M: every 4 7d samples triggers 1 1M sample (2419200s / 604800s = 4, 1M=28d)
- 1M → 3M: every 3 1M samples triggers 1 3M sample (7257600s / 2419200s = 3, 3M=84d)
- 3M → 1Y: every 4 3M samples triggers 1 1Y sample (29030400s / 7257600s = 4, 1Y=336d≈11 months)
The count chain ratio is 12 → 8 → 3 → 7 → 4 → 3 → 4 (5m → 1h → 8h → 24h → 7d → 1M → 3M → 1Y).
Natural Ratio Meaning: The "inflow trigger count" of each window equals the duration ratio of adjacent windows, so data flows naturally from short windows to long windows; the ratio is not a single uniform value but derived from duration ratios. All windows are 61-point FIFOs that drop oldest when full, no manual cleanup needed. eut/rate fields take the mean on inflow; eu/timeMs/tick take the snapshot value.
The 12th 5m point enters both the 5m set and the 1h set (the 5m set never skips a sample, keeping 61 continuous 5-second points). This preserves 5m continuity while automatically driving the longer time windows via the counter chain.
The trend line uses the Fritsch-Carlson monotone cubic Hermite spline:
-
Algorithm:
monotoneCubicPathimplements Fritsch-Carlson monotone cubic Hermite spline - Monotonicity: preserves monotonicity, avoids overshoot
- Endpoints: natural end derivatives, no [0,1] hard clamp
- Smoothing parameter: 0-12
| smoothing | Segments | Description |
|---|---|---|
| 0 | 1 segment | Linear (no smoothing) |
| 1-12 | smoothing × 2 + 2 segments (4-26) | Smooth curve; segment count grows with smoothing |
The info panel supports 3 display modes:
| Mode | Name | Example |
|---|---|---|
| 0 | Normal counting | 1,234,567 |
| 1 | Scientific notation | 1.23E6 |
| 2 | Metric notation | 1.23K |
Metric mode details: Main display call points use 2 decimals (e.g. 1.23K, 999.00); axis Y tick labels keep no decimals (e.g. 1K) to avoid long labels; negative numbers uniformly use prefix minus (-1.23K). In scientific mode, small values (< 10000.0) auto-fallback to normal display.
From v1.5.17 the default is 1 (Scientific). If an old save already has displayMode explicitly stored, the stored value is used; new/unset panels default to scientific.
The dataset is bound to the player UUID; all info panels of the same player share a single copy of the data:
- UUID binding: dataset stored in WorldSavedData with ownerUUID as key
- Multi-screen consistency: multiple panels display identical data
-
Sample lock:
tryAcquireSampleLockglobal sample lock prevents duplicate sampling -
Reverse-write guarantee: after sampling,
dataSet.newest()writes back to cachedEu/cachedEut, ensuring multi-screen consistency
Note: AE monitoring data is isolated by block coordinate (
dimensionId:x:y:z), decoupled from the EU dataset (by ownerUUID). Each info panel maintains its own AE monitoring data independently.
| Parameter | Value | Description |
|---|---|---|
| GUI size | 430 × 285 pixels | Config window size |
| Sample interval | 100 ticks (5 s) | SAMPLE_INTERVAL_TICKS |
| Gap detection | 200 ticks | MAX_CONTINUOUS_GAP_TICKS (breakpoint detection) |
| Dataset capacity | 61 | FIFO capacity per window |
| Extender scan range | 16 blocks | rebuildNearbyScreens scan radius |
| WorldSavedData (EU) | gtswn_network_info_data | EU data persistence name |
| WorldSavedData (AE) | gtswn_ae_monitor_data | AE monitoring data persistence name |
All configuration items of the Network Info Panel (with defaults and ranges):
| Config Item | Type / Default | Range | Description |
|---|---|---|---|
| trendLineSmoothing | int = 2 | 0-12 | Spline smoothing |
| trendLineThickness | int = 3 | - | Trend line width (glLineWidth) |
| displayMode | int = 1 | 0-2 | Display mode (0=Normal / 1=Scientific / 2=Metric); default 1 from v1.5.17 |
| chartBorderThickness | int = 3 | 1-8 | Chart border thickness |
| chartBackgroundColor | String = "" | - | Chart background color (empty = no fill) |
| screenBackgroundColor | String | - | Screen background color (empty = no fill) |
| briefRatio | int = 28 | 10-80 | Brief font ratio (getBriefFontScale()=briefRatio/20.0); from v1.5.17 reused by AE Chart to control brief font size |
| trackingWindow | int | 0-7 | Time window (0=5m / 1=1h / 2=8h / 3=24h / 4=7d / 5=1M / 6=3M / 7=1Y) |
| showBriefEnergy | boolean | - | Brief energy toggle |
| showBriefStatus | boolean | - | Brief status toggle |
| showChartEnergy | boolean | - | Chart energy toggle |
| showChartStatus | boolean | - | Chart status toggle |
| energyAxisMin / Max | String | - | Energy Y-axis range (empty = auto, 10% padding) |
| eutAxisMin / Max | String | - | EU/t Y-axis range (empty = auto, 10% padding) |
Extenders automatically attach to adjacent main panels, forming rectangular screens of any size:
-
Largest sub-rectangle detection:
findLargestFilledRect()finds the largest fully-filled sub-rectangle containing the core - Auto-attach: on placing an extender, it auto-detects adjacent main panels and joins their screen group
-
Connection textures: 16 connection state textures
screen_connected_0.png ~ screen_connected_15.png, auto-selected by neighboring blocks - L/U-shape detach: non-rectangular peripheral extenders are auto-detached
- breakBlock rebuild: breaking any screen block triggers adjacent panels to re-detect stitching
-
EU data:
gtswn_network_info_data(perWorldStorage), Map<ownerUUID, NetworkInfoDataSet> -
AE monitoring data:
gtswn_ae_monitor_data(perWorldStorage), Map<coordinateKey, AEMonitorDataSet>
The main panel TileEntity persists the following:
- UI config (displayMode, trackingWindow, visibility toggles, axis ranges, smoothing, etc.)
- ownerUUID (owner UUID)
- lastSampleTick (last sample tick)
- eutDataSet (local EU/t calculation dataset)
- screen (multi-block screen geometry)
- syncData (sync data)
- AE-related fields (currentTab, chartItem, chartFluid, monitoredItems, monitoredFluids, lastAESampleTick)
When the block is broken, the item retains the following for restoration on re-placement:
- ownerUUID + ownerName
- lastSampleTick (EU sample timestamp)
- lastAESampleTick (AE sample timestamp)
- eutMeasurementHistory (EU/t measurement history)
- chartConfig (chart configuration)
The info panel GUI has 3 tab buttons at the top (IDs 100/101/102) for switching display modes:
| Tab | Name | Content |
|---|---|---|
| Tab 1 | EU Network | EU trend chart & brief (5m/1h/8h/24h window switching, trend line, axes, brief area, see Module 04) |
| Tab 2 | AE Chart | Bind AE item/fluid, dual Y-axis trend chart (see Module 05) |
| Tab 3 | AE Realtime Monitor | Multi-item AE monitor list, 300s average (see Module 06) |
Right-click the panel with an item in hand for quick config:
- EU tab + any item: opens GUI (original behavior)
- AE Chart tab + fluid container: binds fluid
- AE Chart tab + plain item: binds item
- AE Realtime tab + fluid container: adds/removes fluid monitor
- AE Realtime tab + plain item: adds/removes item monitor