Revert to flexible flood-fill scanning with geometric chevron placement
The exact-template approach from the last commit over-fit to the sample ASCII diagram, which was meant to teach the target shape, not be matched literally cell-for-cell. Back to flood-filling any connected, fully-enclosed ring the builder makes (any size/shape), but chevrons are no longer evenly spaced by scan order - the scanner walks the ring in geometric order and marks local maxima of distance from the interior's centroid, i.e. the blocks that stick out further than their ring-neighbours. That's where a real Stargate's chevrons sit (the 11-wide reference ring naturally produces 7 this way: the top apex, four shoulder elbows, two side bumps), without hardcoding a specific size. Falls back to the old evenly-spaced picker only if the ring isn't a simple single-thickness loop (each frame block should have exactly two in-plane neighbours) so odd/thick builds still work. gate.max-frame-blocks/max-iris-blocks/min-frame-blocks are back; gate.template is gone.
This commit is contained in:
@@ -16,38 +16,21 @@ Build everything with `./gradlew build`. Jars land in each module's `build/libs/
|
||||
|
||||
## Building a gate
|
||||
|
||||
A gate's shape is a fixed template in `config.yml` (`gate.template`), matched exactly
|
||||
against the world - not flood-filled or guessed. The default is an 11x11 ring with 7
|
||||
chevrons, laid out top row to bottom row:
|
||||
There's no fixed size or shape - build any single connected ring out of
|
||||
`gate.frame-materials` (default: obsidian, gold block, gilded blackstone, birch/oak
|
||||
planks) with a fully sealed hollow interior. No gaps; the interior must be enclosed.
|
||||
|
||||
```
|
||||
00000000000
|
||||
0000*1*0000
|
||||
00012221000
|
||||
00*22222*00
|
||||
0*2222222*0
|
||||
01222222210
|
||||
0*2222222*0
|
||||
00*22222*00
|
||||
00012221000
|
||||
0000***0000
|
||||
00000000000
|
||||
```
|
||||
Chevrons aren't a separate material you place. When the gate is linked, the plugin
|
||||
flood-fills the ring, walks it in geometric order, and picks out the blocks that stick
|
||||
further outward than their immediate ring-neighbours - the "elbow" points of the
|
||||
shape, which is where a real Stargate's chevrons sit (an 11-wide octagonal ring like
|
||||
the reference design naturally produces 7 of them: the top apex, the four shoulder
|
||||
elbows, and the two side bumps). Those blocks swap to `gate.chevron-lit-material`
|
||||
(default gilded blackstone) while dialing/open, and revert to whatever they looked
|
||||
like at rest when the gate closes - so a chevron can rest as plain obsidian and blend
|
||||
invisibly into the frame until it lights up.
|
||||
|
||||
- `*` — frame block, never touched by the plugin. Must be one of `gate.frame-materials`
|
||||
(default: obsidian, gold block, gilded blackstone, birch/oak planks).
|
||||
- `1` — a chevron: a frame block (same material rules as `*`) that swaps to
|
||||
`gate.chevron-lit-material` (default gilded blackstone) while dialing/open, then
|
||||
reverts to whatever it looked like at rest when the gate closes. So a chevron can
|
||||
rest as plain obsidian and blend invisibly into the frame until it lights up.
|
||||
- `2` — interior ("iris"), filled with `gate.iris-material` (default water) while open.
|
||||
- `0` — ignored, not part of the gate.
|
||||
|
||||
Build it in a single vertical plane, one block thick, aligned to the world's X or Z
|
||||
axis (facing north/south/east/west - not built at an angle). Edit `gate.template` in
|
||||
`config.yml` if you want a different size or chevron count/placement.
|
||||
|
||||
1. Build the frame to match the template.
|
||||
1. Build the ring.
|
||||
2. Place a sign anywhere - it doesn't need to touch the frame, so it can act like a DHD
|
||||
console standing apart from the gate - with:
|
||||
- Line 1: `[Stargate]`
|
||||
@@ -55,13 +38,12 @@ axis (facing north/south/east/west - not built at an angle). Edit `gate.template
|
||||
- Line 3: gate name (blank = auto-generated)
|
||||
- Line 4: `hidden` to keep it out of the cycle list, `fixed:GateName` to lock this
|
||||
gate to always dial `GateName` (no right-click cycling), or blank
|
||||
3. The sign will show "Punch the gate (30s)". Within `gate.link-timeout-seconds`, stand
|
||||
facing the gate square-on and left-click (punch) any `*` or `1` block, within
|
||||
`gate.max-link-distance` of the sign. The plugin matches the template against the
|
||||
world starting from that block and links the sign to it.
|
||||
3. The sign will show "Punch the gate (30s)". Within `gate.link-timeout-seconds`,
|
||||
left-click (punch) any frame block, within `gate.max-link-distance` of the sign.
|
||||
The plugin scans out from that block and links the sign to it.
|
||||
|
||||
If punching a block doesn't work, the plugin tells you exactly why in chat - wrong
|
||||
material, no orientation of the template lines up, too far from the sign, etc.
|
||||
material, unsealed interior, too far from the sign, etc.
|
||||
|
||||
## Using a gate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user