Iron Man#72
Closed
duzos wants to merge 5 commits into
Closed
Conversation
base cuboids on stevesuitmodel and alexsuitmodel had dilation 0.0 - same dimensions as the player skin underneath - so the suit z-fought with the body wherever they overlap (whole torso, arms, legs). bumped base layer to dilation 0.25 (suit always slightly outside the player skin) and overlay layer to 0.5 (always slightly outside the new base) so the layering is body < suit-base < suit-overlay with clear depth separation. matches the convention vanilla uses for armor models. bonus: revert from previous commit was that supermansuit's isalwaysvisible removal still applies; that was a separate visibility-during-invisibility issue, not the z-fight one.
rotateParts (the procedural flight tilt + roll on body/limbs) was being called inside each suit model's render() method. but suitfeature already does: copyfrom(biped) -> suit takes biped pose setangles(...) -> suit runs animations copyto(biped) -> player biped takes suit pose model.render() -> rotateparts ran here, too late so the tilt landed on the suit only. the player's actual biped (which the suit visually overlays) kept its un-tilted pose, leaving a visible mismatch in flight. centralized the timing: suitmodel.setangles now calls a protected rotateparts hook (default no-op) right after runanimations, gated on the same anim/transform condition the subclasses used. moved the actual implementations from private to @OverRide protected in stevesuitmodel, alexsuitmodel, genericironmanmodel, markfivemodel and removed the rotateparts call from each render(). the per-model translates/scales that lived alongside rotateparts in render() stay where they were (those are render-only matrix ops, not part-state mutations).
…o biped follows suit pose
…ield, nano-assembly, mk50/mk85, jarvis hud - intense flight overhaul: iron flight power with sprint-boost, dive (horizontal velocity retention), barrel roll (V key), pose presets (hover/cruise/boost/dive) - flight tilt mixin clamps body pitch/roll smoothly; biped flight pose mixin suppresses vanilla sneak/swim breakage at speed - repulsor: left-click empty hand fires raycast blast 32m with knockback, brief arm-up pose, 8-tick cooldown - uni-beam: hold key 4 to charge 1s then continuous chest beam 2s, damages along line, hud charge bar - missile volley: 6 homing missiles in fan, smoke trail, explode on impact (block damage gated on gamerule) - shield: toggle blocks 60% damage with stamina drain + 3s cooldown, mixin into LivingEntity.damage - per-pixel nano-assembly: custom core shader expands sphere from chest with scattered noise threshold, edge glow tint per-suit; reusable via NanoAssemblableSuit interface - mk3/mk5/mk7 power lists upgraded with iron flight + combat kit; mk50 (nano-tech, red glow) and mk85 (full kit + nano gold) added - sentry mode ai: repulsor attack goal + move-to-target goal; drone engages hostiles in 32m radius - jarvis hud extended: energy bar, suit integrity %, flight mode, targeting reticle, threat list (top 3 hostiles) - timelessSuitBlockDamage gamerule for opt-in block destruction - Power.java gains handlesLeftClick + applyPose virtual hooks; PowerLeftClickHandler + PowerRightClickHandler dispatch via UsePowerC2SPacket - 9 power keybinds (1-4 + V/B/N/M/J for 5-9) - 9 new sfx events registered with placeholder oggs cloned from ironman_powerup - access-widener exposes RenderPhase.ShaderProgram + Texture for the custom nano render layer
Owner
Author
|
lame |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Iron Man feature set across suits, powers, rendering, HUD, entities, and input handling. It introduces new combat/flight mechanics (repulsor, uni-beam, missiles, shield, barrel roll, iron-flight tilt), adds Mk50/Mk85, implements a reusable nano-assembly shader/render layer, and updates sentry AI + Jarvis HUD panels.
Changes:
- Adds new Iron Man powers (repulsor, uni-beam, missiles, shield, barrel roll, nano-assemble) and wires them into Mk3/Mk5/Mk7 + new Mk50/Mk85 suit sets.
- Adds new entities/renderers (missiles, repulsor blast) and new client render systems (iron-flight tilt state, uni-beam world renderer, nano shader + render layer).
- Extends the suit model pipeline to support procedural per-frame pose hooks and power-driven pose application.
Reviewed changes
Copilot reviewed 55 out of 74 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/timeless.mixins.json | Registers new mixins for shield damage scaling and iron-flight pose/renderer tweaks. |
| src/main/resources/timeless.accesswidener | Adds access widening needed for custom RenderLayer MultiPhase + shader plumbing. |
| src/main/resources/assets/timeless/shaders/core/nano_assemble.vsh | Nano-assemble vertex shader for per-pixel reveal pipeline. |
| src/main/resources/assets/timeless/shaders/core/nano_assemble.json | Shader program definition (samplers/uniforms/blend config). |
| src/main/resources/assets/timeless/shaders/core/nano_assemble.fsh | Nano-assemble fragment shader (discard threshold + edge tint). |
| src/main/java/mc/duzo/timeless/Timeless.java | Initializes new TimelessGameRules. |
| src/main/java/mc/duzo/timeless/suit/set/SetRegistry.java | Registers new Mk50/Mk85 suit sets. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk85/MarkEightyFiveSuit.java | Adds Mk85 suit definition + nano-assemble config + power list. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk85/client/MarkEightyFiveModel.java | Mk85 client model wrapper resolving suit from SetRegistry. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk7/MarkSevenSuit.java | Updates Mk7 powers to use IRON_FLIGHT + combat suite. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk50/MarkFiftySuit.java | Adds Mk50 suit definition + nano-assemble config + power list. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk50/client/MarkFiftyModel.java | Mk50 client model wrapper resolving suit from SetRegistry. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk5/MarkFiveSuit.java | Updates Mk5 powers to use IRON_FLIGHT + repulsor/uni-beam/shield. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk5/client/MarkFiveModel.java | Adjusts flight-rotation hook visibility to integrate with new base rotation pipeline. |
| src/main/java/mc/duzo/timeless/suit/ironman/mk3/MarkThreeSuit.java | Updates Mk3 powers to use IRON_FLIGHT + repulsor. |
| src/main/java/mc/duzo/timeless/suit/ironman/IronManEntity.java | Adds sentry-mode goals: repulsor attack + move-to-target. |
| src/main/java/mc/duzo/timeless/suit/ironman/client/GenericIronManModel.java | Moves procedural rotations into shared setAngles-driven pipeline. |
| src/main/java/mc/duzo/timeless/suit/client/render/SuitModel.java | Adds rotateParts hook + per-power applyPose dispatch + biped part accessors. |
| src/main/java/mc/duzo/timeless/suit/client/render/SuitFeature.java | Adds nano-assemble render layer swap + copies pose back to biped after setAngles. |
| src/main/java/mc/duzo/timeless/suit/client/render/generic/SteveSuitModel.java | Adjusts dilations and routes walk-cycle via setAngles, integrating rotateParts hook + bone accessors. |
| src/main/java/mc/duzo/timeless/suit/client/render/generic/AlexSuitModel.java | Same as Steve model changes for Alex proportions. |
| src/main/java/mc/duzo/timeless/suit/api/NanoAssemblableSuit.java | Introduces nano-assemble marker/config interface (edge color, radius, ticks). |
| src/main/java/mc/duzo/timeless/power/PowerRegistry.java | Registers new Iron Man powers including IRON_FLIGHT/combat/nano. |
| src/main/java/mc/duzo/timeless/power/Power.java | Adds click-handling hooks and per-frame pose hook for powers. |
| src/main/java/mc/duzo/timeless/power/impl/UniBeamPower.java | Adds uni-beam charge/fire server logic + per-tick damage/particles. |
| src/main/java/mc/duzo/timeless/power/impl/ShieldPower.java | Adds shield toggle + hit stamina + cooldown + damage scaling helper. |
| src/main/java/mc/duzo/timeless/power/impl/RepulsorPower.java | Adds repulsor blast server logic + beam entity spawn + pose hook entry points. |
| src/main/java/mc/duzo/timeless/power/impl/NanoAssemblePower.java | Adds nano-assemble progress tracking and on-load retrigger behavior. |
| src/main/java/mc/duzo/timeless/power/impl/MissileVolleyPower.java | Adds missile volley spawning with cooldown tracking. |
| src/main/java/mc/duzo/timeless/power/impl/IronManFlightPower.java | Adds iron-flight boost/dive state tracking and dive velocity retention. |
| src/main/java/mc/duzo/timeless/power/impl/FlightPower.java | Ensures flight booleans are gated by currently worn suit flight powers. |
| src/main/java/mc/duzo/timeless/power/impl/BarrelRollPower.java | Adds barrel-roll timer state for renderer-driven roll animation. |
| src/main/java/mc/duzo/timeless/mixin/ShieldDamageMixin.java | Scales incoming damage while shield active (except select environmental sources). |
| src/main/java/mc/duzo/timeless/mixin/client/PlayerEntityRendererMixin.java | Renders suit arm at renderArm tail (no longer cancels vanilla). |
| src/main/java/mc/duzo/timeless/mixin/client/IronManFlightRendererMixin.java | Applies iron-flight tilt in LivingEntityRenderer.setupTransforms tail. |
| src/main/java/mc/duzo/timeless/mixin/client/BipedFlightPoseMixin.java | Clears vanilla sneak/lean pose during flight modes to avoid fighting tilt. |
| src/main/java/mc/duzo/timeless/entity/RepulsorBlastEntity.java | Adds short-lived visual beam entity with synced endpoint. |
| src/main/java/mc/duzo/timeless/entity/MissileEntity.java | Adds homing missile entity with optional block-damage via gamerule. |
| src/main/java/mc/duzo/timeless/datagen/TimelessDataGenerator.java | Adds translations for new power keys, items, and sound events. |
| src/main/java/mc/duzo/timeless/core/TimelessSounds.java | Registers new Iron Man sound events. |
| src/main/java/mc/duzo/timeless/core/TimelessGameRules.java | Adds timelessSuitBlockDamage gamerule. |
| src/main/java/mc/duzo/timeless/core/TimelessEntityTypes.java | Registers REPULSOR_BLAST and MISSILE entity types. |
| src/main/java/mc/duzo/timeless/core/items/SuitItem.java | Adds int/float SuitItem.Data helpers with sync support. |
| src/main/java/mc/duzo/timeless/client/TimelessClient.java | Initializes flight state + nano shader registration; registers uni-beam world renderer; registers new entity renderers. |
| src/main/java/mc/duzo/timeless/client/render/UniBeamRenderer.java | Renders uni-beam line in world for shooting players. |
| src/main/java/mc/duzo/timeless/client/render/NanoShaderHolder.java | Registers nano shader and provides uniform update helper. |
| src/main/java/mc/duzo/timeless/client/render/NanoAssembleRenderLayer.java | Defines custom RenderLayer using nano core shader + translucent params. |
| src/main/java/mc/duzo/timeless/client/render/IronManFlightTilt.java | Computes/apply pitch+roll transforms based on flight/boost/dive/roll state. |
| src/main/java/mc/duzo/timeless/client/render/IronManFlightState.java | Adds client-smoothed timers for flight/boost/dive state. |
| src/main/java/mc/duzo/timeless/client/render/entity/RepulsorBlastRenderer.java | Renders repulsor blast line effect. |
| src/main/java/mc/duzo/timeless/client/render/entity/MissileRenderer.java | Renders missile as oriented line strip placeholder. |
| src/main/java/mc/duzo/timeless/client/keybind/TimelessKeybinds.java | Adds power keybinds 5–9 and per-tick click handlers. |
| src/main/java/mc/duzo/timeless/client/keybind/PowerRightClickHandler.java | Sends UsePower packet when a power claims right-click. |
| src/main/java/mc/duzo/timeless/client/keybind/PowerLeftClickHandler.java | Sends UsePower packet when a power claims left-click. |
| src/main/java/mc/duzo/timeless/client/gui/JarvisGui.java | Adds new HUD panels: energy bar, integrity, flight mode, targeting reticle, threat list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @Override | ||
| public boolean shouldRender(MissileEntity entity, Frustum frustum, double camX, double camY, double camZ) { | ||
| return true; |
Comment on lines
+59
to
+63
| matrices.pop(); | ||
| super.render(entity, yaw, tickDelta, matrices, vertexConsumers, light); | ||
| // Use MathHelper to silence the unused-import warning if any. | ||
| if (false) MathHelper.sin(0); | ||
| } |
Comment on lines
+29
to
+32
| @Override | ||
| public boolean shouldRender(RepulsorBlastEntity entity, Frustum frustum, double camX, double camY, double camZ) { | ||
| return true; | ||
| } |
Comment on lines
+32
to
+36
| // Dive: triggered when client sends a flight-toggle while sprinting at speed. | ||
| // For the MVP, derive it server-side: if was-flying, now-not-flying, sprinting, fast → dive. | ||
| if (isDiving(player)) { | ||
| int diveTicks = SuitItem.Data.contains(player, K_DIVE_TICKS) ? SuitItem.Data.getInt(player, K_DIVE_TICKS) : 0; | ||
| diveTicks++; |
Comment on lines
+16
to
+20
| @ModifyVariable(method = "damage", at = @At("HEAD"), argsOnly = true) | ||
| private float timeless$shieldScaleIncoming(float amount, DamageSource source) { | ||
| LivingEntity self = (LivingEntity) (Object) this; | ||
| if (!(self instanceof PlayerEntity player)) return amount; | ||
| if (!ShieldPower.isActive(player)) return amount; |
|
|
||
| import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; | ||
|
|
||
| import net.minecraft.client.network.ClientPlayerEntity; |
Comment on lines
+55
to
+58
| float progress = mc.duzo.timeless.power.impl.NanoAssemblePower.progress(livingEntity); | ||
| mc.duzo.timeless.client.render.NanoShaderHolder.setUniforms(progress, 1.0f, nano.getNanoMaxRadius(), nano.getNanoEdgeColor()); | ||
| consumer = vertexConsumerProvider.getBuffer(mc.duzo.timeless.client.render.NanoAssembleRenderLayer.of(model.texture())); | ||
| } else { |
Comment on lines
+114
to
+117
| public void applyPose(LivingEntity entity, SuitModel model) { | ||
| if (!(entity instanceof PlayerEntity player)) return; | ||
| Integer poseLeft = POSE_REMAINING.get(player.getUuid()); | ||
| if (poseLeft == null || poseLeft <= 0) return; |
Comment on lines
+64
to
+67
| EntityHitResult hit = ProjectileUtil.raycast(shooter, origin, end, | ||
| new Box(origin, end).expand(1.0), | ||
| e -> e instanceof LivingEntity && e != shooter && !e.isSpectator(), | ||
| RANGE * RANGE); |
Comment on lines
+88
to
+90
|
|
||
| if (shooter instanceof PlayerEntity p) POSE_REMAINING.put(p.getUuid(), POSE_TICKS); | ||
| } |
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
Builds out the Iron Man kit on
feat/ironman: combat (repulsor, uni-beam, missiles, shield), an intense flight system with boost/dive/barrel-roll, two new marks (mk50, mk85), a reusable per-pixel nano-assembly shader, sentry-mode AI, and a full Jarvis HUD overhaul. Branched frommasterwith general suit/biped fixes cherry-picked from the spiderman + superman branches.Cherry-picks
1a044e3de79cf0setAnglesso the biped follows the tilt6298765SuitFeature.copyToaftersetAnglesso biped picks up suit pose5fe1225FlightPower.hasFlightgates on the worn suit's powers (no pole-vault when swapping) + explicit walk-cycle in suitsetAnglesCombat
Repulsor blast (left-click empty hand)
Power.handlesLeftClickvirtual hook +PowerLeftClickHandlerpollingattackKeyRepulsorBlastEntityfor the visual line that fades over 8 ticksapplyPoseraises the firing arm forward for 6 ticks, lerpedRepulsorPower.fireFrom(LivingEntity, Vec3d)is reusable - the sentry-mode drone calls into it directlyUni-beam (hold key 4)
entity.getBodyY(0.7), damages entities along the line, particles at the terminusUniBeamRendererregistered viaWorldRenderEvents.AFTER_TRANSLUCENTdraws a glowing line from chest to terminusMissile volley (key 3 on mk7/mk85)
MissileEntityprojectiles in a fan above the player, each homes on nearest hostile within 24m or arcs forward if no target/gamerule timelessSuitBlockDamageShield (toggle key on mk5/mk7/mk85)
ShieldDamageMixininjectsLivingEntity.damageHEAD; while active and damage source isn't fall/void/drown/wall, scale incoming by 0.4SHIELDindicator while activeFlight overhaul
IronManFlightPowerextendsFlightPoweradding boost + dive:isBoosting), sets a flag that the tilt mixin reads to lean furtherIronDivingto true and retains horizontal velocity (v *= 1.0989per tick) until ground or 80-tick timeoutBarrelRollPower, key V) - sets a roll timer ±16 ticks;IronManFlightTiltrotates the body around its forward axis byrollProgress * 360°while the timer winds downIronManFlightStateis a per-player client-side smoothed timer (mirrorsWebSwingStatepattern):flight,boost,divetimers each ramp 0..1 over 6 ticks viaSTEP = 1/6IronManFlightTiltreads them, applies pitch (clamped -85..+25°) and roll (clamped ±45°) viaLivingEntityRenderer.setupTransformsTAIL mixin (IronManFlightRendererMixin)BipedFlightPoseMixininjectsBipedEntityModel.setAnglesHEAD and clearsmodel.sneaking = false; leaningPitch = 0while the entity is in any flight mode, so vanilla's sneak/swim crouch never fights the tilt at high speed.Mark expansion
Existing mk3/mk5/mk7 swap from basic
FLIGHT/BOOSTED_FLIGHTtoIRON_FLIGHTand gain combat powers:Two new marks:
MarkFiftySuit, nano-tech, red glow) -IRON_FLIGHT, HOVER, MASK_TOGGLE, REPULSOR, UNI_BEAM, MISSILE_VOLLEY, SHIELD, BARREL_ROLL, NANO_ASSEMBLE, JARVISMarkEightyFiveSuit, top-tier, gold glow) - everything mk50 has +SENTRYBoth implement the new
NanoAssemblableSuitinterface with distinct edge colours.Reusable per-pixel nano-assembly
For any suit that implements
NanoAssemblableSuit(provides edge colour + max radius + assemble ticks):NanoAssemblePowerramps a per-playerNanoProgress0..1 overgetNanoAssembleTicks()ticks; re-triggered ononLoad(so re-equipping replays the animation)assets/timeless/shaders/core/nano_assemble.{json,vsh,fsh}registered viaCoreShaderRegistrationCallbackinNanoShaderHolderNanoMaxRadius. Adds per-fragment scatter noise via a hash function. Ifdist > progress + scatter, discard. Edge band tinted withNanoEdgeColorNanoAssembleRenderLayer.of(texture)builds a customRenderLayer.MultiPhaseParameterswith the shader, translucent transparency, no cullingSuitFeatureswaps the render layer when the worn suit isNanoAssemblableSuit && progress < 1, callingNanoShaderHolder.setUniforms(progress, originY, maxRadius, edgeColor)firstPer-pixel reveal sweeps from chest outward with a scattered fuzzy boundary glow.
Sentry AI
Replaced the stub goal in
IronManEntitywith two new goals:RepulsorAttackGoal- within 24m of any hostile, fires repulsor every 30 ticks viaRepulsorPower.fireFrom. Reuses the player repulsor.MoveToTargetGoal- while target > 12m away, navigates toward it at 1.2 speedFollowOwnerGoalretained at lower priorityJarvis HUD
JarvisGuiextended with five new panels (only render with mask closed):Controls
SFX
9 new sound events registered:
ironman_repulsor,ironman_unibeam_charge,ironman_unibeam_fire,ironman_missile_launch,ironman_shield_hit,ironman_targetlock,ironman_nano_assemble,ironman_boost,ironman_dive. Placeholder ogg files cloned fromironman_powerupso audio plays during testing; final assets to be sourced.Test plan
/gamerule timelessSuitBlockDamage truethen volley a wall - blocks break; default false leaves them intact