Spiderman#53
Draft
duzos wants to merge 11 commits into
Draft
Conversation
resolves three conflicts: - power.java: trivial whitespace - setregistry.java: kept both miles + moonknight registrations - suititem.java: kept master's data attachment + iswearing gate, dropped branch's chest-only path - milessuit.java: dropped a getanimationinfo override using a non-existent enum (AnimationInfo.RenderType.TORSO_HEAD); the default ClientSuit.getAnimationInfo handles per-slot visibility correctly
…cs, ceiling invert replaces the placeholder wallclimbpower with the proper sneak-to-attach pattern: - new util/wallcrawldata: serializable per-player state (side direction, attach timer, ceiling invert timer) stored on the suit-data attachment so it auto-syncs to clients via the existing s2c chain - wallclimbpower now extends power directly (was togglepower<equipsoundsupplier> which didnt fit). server tick: detect attach via ground+sneak+raycast against 5 candidate sides (n/s/e/w/ceiling, range 1.5b); detect detach via jump (synced through the existing keybind packet) or landing on the floor. while attached, applies a small velocity bias toward the wall to keep the player stuck. - new mixin/client/wallcrawlrenderermixin injects at tail of livingentityrenderer.setuptransforms. while inverttimer > 0 (player attached to a ceiling), interpolates a 180-deg rotation around z plus a height translation so the player flips upside-down smoothly. wall-side tilt (player rotated 90 to lie against vertical walls) is mechanical-only for now; visual tilt for vertical walls is a follow-up. - mixin registered in timeless.mixins.json
v0.2 only treats http 200 as success. discord webhooks with file attachments return 204 (no content) which the action raised as `Failed to send webhook: 204`. half the recent runs flagged failed for this reason. v0.3 explicitly accepts 204 (one-line change in webhook.ts: `== 200` -> `== 200 || == 204`). pinned to its commit sha for the same supply-chain reason as the v0.2 pin.
…on climb builds on the initial wall-crawl scaffolding with the missing pieces from the reference: - mixin/WallCrawlTravelMixin: head-injects livingentity.travel, cancels vanilla when wall-crawl is enabled and the worn suit has wall_climb. ports the moveEntityWithHeading math from the reference - look pitch projects onto the wall plane (forward * sinPitch * 1.5 = vertical climb), strafe goes perpendicular along the wall surface using yaw. for ceilings, flat 2d motion in the ceiling plane. sticky bias (0.08 toward wall), away-component zero, 0.91 drag. - wallclimbpower: tryAttach now uses look-direction raycast at range 3.0 (not cardinal-iteration at 1.5), stores side as the hit face, no longer requires airborne. tickShared sets nogravity while attached and runs three checks for detach: jump pressed, on ground past the 0.5-timer grace period, or the multi-point wall-probe raycast (eye + center + feet) misses entirely. that last one catches cresting the top of a wall - all three probes go horizontally past empty space, all miss, immediate detach. - flightpower: gated hasflight/isflying on the worn suit having flight or boosted_flight. fixes a stale-flag bug where switching from iron man (which sets isflying=true on the suit-data attachment) to spider man (alex model) caused alexsuitmodel.rotateparts to apply the iron-man flight pose every frame on miles, overriding the walk cycle. - stevesuitmodel + alexsuitmodel: explicit walk-cycle limb math (cos(limbAngle * 0.6662) * 1.4 * limbDistance for legs etc) in setAngles before super, so walk pose is guaranteed regardless of copyfrom propagation. animations layered on top. - suitfeature: copyto(context) after setangles so post-animation pose pushes back to the player biped. - timeless.mixins.json: registered wallcrawltravelmixin (common-side mixin)
…e, sfx - web rope entity with swing (pendulum), zip (eased pull + ground snap), bind (immobilise + reel) modes - right-click fires; mode picked from look-target (hostile -> bind, sneak+block -> zip, else swing) - scroll wheel rappels rope length 1.5-48 with smooth lerp + click sfx - left-click during swing releases with forward+up boost - procedural arm pose: gripping arm tracks rope, trail arm + legs scale 0-45 deg with horizontal speed - whole-body tilt via livingentityrenderer mixin, smoothed pitch/roll based on motion + rope direction - biped sneak pose suppressed during swing; held-item renderer extended so off-hand renders when rope is on off-arm - swing fall grace: 80-tick window cancels fall damage during and after rope use - spidey sense toggle power: client-only outline on hostile/projectile threats, hud vignette pulses with proximity, threat tracker scores velocity-toward-player - spiderman_shoot sfx pulled from archive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Spider-Man kit: wall crawl (already shipped), web rope with three behaviour modes, scroll-wheel rappel, fall-damage immunity, spidey sense, and sfx. Now ships with three character variants (Miles, classic Spider-Man, Spider-Noir with a fedora).
Characters
timeless:spiderman. Texture filespiderman.png. Same four-power kit as the others.timeless:spiderman_miles.timeless:spiderman_spidernoir. Has a custom fedora: three head-parented cubes (crown 8x3x8, crown overlay 8x3x8, brim 11x1x11 tilted -2.5deg) on a dedicatedSpiderNoirSuitModelextendingAlexSuitModel. Texture is 64x128 - top half is the standard player skin, bottom half packs the fedora UVs (crown at U=0,V=64 / overlay at U=32,V=64 / brim at U=0,V=80).All three share the same
PowerList: web swing, wall climb, super strength, spidey sense.Texture remap tooling
Two scripts under
scripts/translate bbmodel-authored skins onto Minecraft's standard player UV layout:remap_spidernoir.py- readsSpiderNoir.bbmodel(128x128 source, custom UVs, separate fedora cubes) and writes a 64x128 destination usingPlayerModelTrue.bbmodelfor body/head/legs UVs, Alex 3-wide overrides for arms, and packed fedora UVs in the bottom half.remap_spiderman.py- the simpler 64x64 -> 64x64 Steve case for the classic skin (source uses incorrect mirror_uv arm mappings; output uses the standard layout).Both scripts match elements by name, copy each face's source UV rectangle into the destination UV rectangle, and apply per-axis flips when the source/dest UV signs differ. Re-runnable any time the source bbmodel or PNG changes.
Powers
Web rope (right-click, empty main hand)
A single
WebRopeEntityprojectile drives three modes, picked at fire time from the look-target:targetLength. Now persists through ground contact - the on-ground disconnect was removed, so a rope anchored to a wall keeps pulling you across a rooftop or pulls you up from a standing start.sin(t * pi/2)curve over 6 ticks, holds at peak speed, snaps to surface (small upward boost) on arrival. Auto-cancels on left-click or 50-tick timeout.Common: rope side (left/right arm) is server-decided based on body-yaw vs head-yaw delta with a small random roll. Anchors land on any block face including the floor (the projectile raycast has no face filter); combined with the persist-on-ground change, floor-mounted ropes are now usable.
Scroll wheel rappel
MouseMixininjectsMouse.onMouseScrollHEAD - while the local player has a swing-mode rope, the scroll event is consumed (no hotbar swap) and forwarded asWebRappelC2SPacket(direction). Server-siderappel(direction)adjuststargetLengthclamped to[1.5, 48], plays a tripwire-click sfx with up/down pitch difference, and the rope length lerps toward target server-side at 0.18 per tick. Sneak no longer affects rope length (was unintuitive vs scroll input).Swing release
Left-click during a live swing rope releases it with
look * 0.45 + Y 0.35boost.Fall-damage immunity
SwingFallGraceis a UUID-keyed timer map. Every server tick of a swing/zip rope refreshes the grace; a swing release also grants it.SwingFallDamageMixininjectsLivingEntity.computeFallDamageandhandleFallDamage, returning 0/false during grace. Grace lasts 80 ticks past the last refresh.Spidey sense (toggle, key 4)
Per-player NBT bool flipped by power 4. While enabled,
SpideySenseTrackerticks each client tick:EntityGlowMixinreturns true fromEntity.isGlowingfor any threat with non-zero intensity, client-side only for the local sensing player. Other players see nothing.SpideySenseHudoverlays the vanilla vignette tinted red, alpha = max-intensity * 0.45 lerped, pulsingsin(age * 0.35) * 0.65-1.0.Pose & rendering
WebSwingState.postSwing): set when a rope is active and the player is airborne, cleared on ground contact. The fade-timer ramps up during either rope-live OR post-swing mode and only ramps down on landing. The grip arm pose only applies while a rope is present; the trail-arm/leg/body sway continues through the airborne tail of a swing.vertSpeedterm so falls and climbs both extend the trail arm forward and bias the body forward (signed velocity made arms collapse inward on descent). Post-swing both arms rise to a fall-reach driven byvertSpeedplus the swing oscillator.WebSwingRendererMixinonLivingEntityRenderer.setupTransforms): pitch driven byatan2(motion.y, horizSpeed), roll by lateral rope direction times motion magnitude (or by sideways body-local motion when the rope is gone). Targets clamped to +/-25 deg, smoothed via per-player tick-lerp at 0.18 to absorb constraint snaps.WebSwingPower.applyPose): grip arm rotation derived from body-local rope direction;pitch = atan2(-lz, -ly),roll = -asin(lx). Trail arm + legs scale 0-45 deg with full 3D speed. Outward-roll sign: pivot at-Xuses positive roll, pivot at+Xuses negative roll.BipedSwingPoseMixin): clearsmodel.sneaking = falseon biped setAngles HEAD when the entity is mid-swing, so the crouched pose doesn't show through.SuitModel.resetSneakPivotsresets head/body/arm/leg pivots that get copied from the biped during swing.HeldItemRendererMixin+HeldItemRendererInvoker): when the rope is on the off-arm side, vanilla'srenderArmHoldingItemis invoked manually for that arm so the suit's off-arm renders even though the slot is empty.WebRopeRenderer): during a swing the rope endpoint isshoulder + min(arm_length, rope_distance) * direction_to_rope, so the line attaches at the gripping fingertip rather than the rest-pose hand offset.PlayerEntityRendererMixin.timeless$renderArmnow readsarm.pivotX < 0instead ofplayer.getMainArm() == RIGHT, so the suit renders the correct arm bone for whichever side vanilla requested.Controls
SFX
spiderman_shoot.oggextracted from thearchivebranch, re-namespaced undertimeless:. Plays on rope fire, reel, and spidey sense toggle (different pitches per cue).Test plan