feat(redstone-link): real block textures via build-textures.py, add build.sh
The first textures were a motif floating on a flat slab. That hits the lesson already documented on mailbox_block(): an icon-like sprite "reads as a placeholder when applied to all 6 faces of a cube". Replaced with machine faces whose traces run out to the edges, so they connect across tile boundaries and a wall of them reads as continuous circuitry -- transmitter radiating out, receiver feeding in. Generated through scripts/build-textures.py using the existing palette and rect/px/save helpers rather than an ad-hoc script, so they regenerate with everything else. Running the pipeline also rewrites the other five textures, but pixel-identically -- that churn is only a newer Pillow re-encoding, so those files are left alone. RP header bumped to 1.0.1 (with the BP dependency to match) because clients cache packs by uuid+version and would otherwise keep serving the old art. The lobby world pin was updated to match; a mismatch silently drops the pack from the stack. Adds build.sh to package the .mcaddon, mirroring addon/build.sh. It omits that script's `-x` exclude: these packs have no dotfiles, and dropping it keeps the script working with the 7-Zip `zip` shim on the workstation as well as Info-ZIP on the CI runner. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Gf1kZypRDfPL1YiWUS1LC
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ded29cbcc
commit
db8931784e
@@ -397,12 +397,99 @@ def portal_field() -> Image.Image:
|
||||
return img
|
||||
|
||||
|
||||
# ── Redstone Link transmitter / receiver ───────────────────
|
||||
# Machine faces, not icons. Following the mailbox lesson: the motif has to
|
||||
# reach the edges or a cube of it reads as a placeholder. Both share a gunmetal
|
||||
# plate with corner rivets and a beveled frame; the transmitter carries redstone
|
||||
# traces radiating OUT to all four edges, the receiver carries traces running IN
|
||||
# to a collector dish. Same silhouette, mirrored behaviour, different accent.
|
||||
|
||||
LINK_PLATE = (62, 66, 74)
|
||||
LINK_PLATE_HL = (92, 97, 107)
|
||||
LINK_PLATE_SH = (38, 41, 47)
|
||||
LINK_RIVET = (140, 146, 158)
|
||||
|
||||
TX_TRACE = (168, 30, 28)
|
||||
TX_TRACE_HOT = REDSTONE_BRIGHT
|
||||
TX_CORE = (255, 140, 110)
|
||||
|
||||
RX_TRACE = (34, 96, 150)
|
||||
RX_TRACE_HOT = (92, 178, 240)
|
||||
RX_CORE = (200, 240, 255)
|
||||
|
||||
|
||||
def _link_plate() -> Image.Image:
|
||||
"""Shared gunmetal base: beveled frame + corner rivets, fully opaque."""
|
||||
img = Image.new("RGBA", (16, 16), LINK_PLATE)
|
||||
# Bevel: lit top/left, shadowed bottom/right
|
||||
rect(img, 0, 0, 15, 0, LINK_PLATE_HL)
|
||||
rect(img, 0, 0, 0, 15, LINK_PLATE_HL)
|
||||
rect(img, 0, 15, 15, 15, LINK_PLATE_SH)
|
||||
rect(img, 15, 0, 15, 15, LINK_PLATE_SH)
|
||||
# Corner rivets
|
||||
for cx, cy in ((2, 2), (13, 2), (2, 13), (13, 13)):
|
||||
px(img, cx, cy, LINK_RIVET)
|
||||
px(img, cx, cy + 1, LINK_PLATE_SH)
|
||||
return img
|
||||
|
||||
|
||||
def redstone_link_tx() -> Image.Image:
|
||||
img = _link_plate()
|
||||
# Traces running from the core out to all four edges: this is what makes a
|
||||
# cube of it read as wiring rather than a centred sprite.
|
||||
rect(img, 7, 0, 8, 15, TX_TRACE)
|
||||
rect(img, 0, 7, 15, 8, TX_TRACE)
|
||||
# Diagonal spurs toward the corners
|
||||
for i in range(3, 7):
|
||||
px(img, i, i, TX_TRACE)
|
||||
px(img, 15 - i, i, TX_TRACE)
|
||||
px(img, i, 15 - i, TX_TRACE)
|
||||
px(img, 15 - i, 15 - i, TX_TRACE)
|
||||
# Emitter core, hot centre
|
||||
rect(img, 6, 6, 9, 9, TX_TRACE_HOT)
|
||||
rect(img, 7, 7, 8, 8, TX_CORE)
|
||||
px(img, 7, 7, (255, 235, 220))
|
||||
# Trace highlight so the cross reads as raised
|
||||
rect(img, 7, 1, 7, 5, TX_TRACE_HOT)
|
||||
rect(img, 1, 7, 5, 7, TX_TRACE_HOT)
|
||||
return img
|
||||
|
||||
|
||||
def redstone_link_rx() -> Image.Image:
|
||||
img = _link_plate()
|
||||
# Collector rings, broken at the axes so the in-running traces read clearly
|
||||
for x in range(3, 13):
|
||||
px(img, x, 3, RX_TRACE)
|
||||
px(img, x, 12, RX_TRACE)
|
||||
for y in range(3, 13):
|
||||
px(img, 3, y, RX_TRACE)
|
||||
px(img, 12, y, RX_TRACE)
|
||||
for x in range(5, 11):
|
||||
px(img, x, 5, RX_TRACE_HOT)
|
||||
px(img, x, 10, RX_TRACE_HOT)
|
||||
for y in range(5, 11):
|
||||
px(img, 5, y, RX_TRACE_HOT)
|
||||
px(img, 10, y, RX_TRACE_HOT)
|
||||
# Feed lines from the edges into the dish
|
||||
rect(img, 7, 0, 8, 2, RX_TRACE)
|
||||
rect(img, 7, 13, 8, 15, RX_TRACE)
|
||||
rect(img, 0, 7, 2, 8, RX_TRACE)
|
||||
rect(img, 13, 7, 15, 8, RX_TRACE)
|
||||
# Collector core
|
||||
rect(img, 7, 7, 8, 8, RX_TRACE_HOT)
|
||||
px(img, 7, 7, RX_CORE)
|
||||
px(img, 8, 8, RX_CORE)
|
||||
return img
|
||||
|
||||
|
||||
def main() -> None:
|
||||
save(smart_crafting_table(), "smart-crafting-addon/smart_crafting_RP/textures/blocks/smart_crafting_table.png")
|
||||
save(post_office_block(), "postal-service-addon/postal_service_RP/textures/blocks/post_office.png")
|
||||
save(mailbox_block(), "postal-service-addon/postal_service_RP/textures/blocks/mailbox.png")
|
||||
save(tent_canvas(), "camping-supplies-addon/camping_supplies_RP/textures/blocks/tent_canvas.png")
|
||||
save(portal_field(), "lobby-addon/lobby_transfer_RP/textures/blocks/portal_field.png")
|
||||
save(redstone_link_tx(), "redstone-link-addon/redstone_link_RP/textures/blocks/redstone_link_tx.png")
|
||||
save(redstone_link_rx(), "redstone-link-addon/redstone_link_RP/textures/blocks/redstone_link_rx.png")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user