Skip to content

Implement shields (complete vanilla)#1248

Draft
HashimTheArab wants to merge 16 commits into
df-mc:masterfrom
HashimTheArab:shields-vanilla-df-master
Draft

Implement shields (complete vanilla)#1248
HashimTheArab wants to merge 16 commits into
df-mc:masterfrom
HashimTheArab:shields-vanilla-df-master

Conversation

@HashimTheArab

Copy link
Copy Markdown
Collaborator

Codex ran for 4 hours off 1 prompt to build this (draft PR). More than half of this is tests, the code needs to be cleaned up a bit and remove redundant tests

Overview

Implements vanilla shield gameplay end-to-end: registers a new minecraft:shield item (offhand, durability/repair) and adds player-side shield blocking state driven by auth input and item-use, including warm-up delay, facing checks, durability loss, axe disable cooldown, recoil, and shield-block sound/metadata.

Extends combat interactions so shields can block melee/projectile/explosion damage and deflect projectiles (skipping hit effects/callbacks on deflection), while explosions now carry origin/source and a shield-blockability flag.

Updates TNT/explosion plumbing to preserve chain attribution and shield-blockability across primed TNT spawns (new optional EntityRegistryConfig.TNTWithSource, TNT entity behaviour/NBT support, and block TNT ignition/explosion source handling), plus ensures held/offhand inventory mutations refresh derived held-item/shield state via session transaction handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant