Skip to content

Add BetterMace Fabric mod for Minecraft 1.21.4#2

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1778958686-bettermace-fabric-mod
Open

Add BetterMace Fabric mod for Minecraft 1.21.4#2
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1778958686-bettermace-fabric-mod

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Adds a self-contained Fabric mod under minecraft-mods/bettermace/ that improves the vanilla Mace weapon in Minecraft 1.21.4. This is a new top-level subdirectory in the repo and does not touch any existing DeepSeek-Math code.

What the mod does (all toggleable / tuneable via config/bettermace.json):

  • AOE smash attack — when a real smash hit lands (fall distance > threshold, not elytra-flying), nearby LivingEntitys around the primary target also take a fraction of the fall-distance bonus damage and get knocked outward. Radius scales with fall distance up to a cap.
  • Optional lightning bolt on extreme falls (off by default; cosmetic-only by default when enabled).
  • Optional self-bounce for the attacker after a smash (extra vertical impulse on top of Wind Burst).
  • Skips spectators and (optionally) teammates.
  • Plays MACE_SMASH_GROUND_HEAVY + SWEEP_ATTACK particles for the AOE.

Implementation: a single mixin (MaceItemMixin) @Injects at HEAD of net.minecraft.item.MaceItem#postHurtEnemy. Config is a simple GSON-serialized POJO in FabricLoader.getConfigDir()/bettermace.json, auto-created on first load.

Files added (all new, under minecraft-mods/bettermace/):

  • build.gradle, settings.gradle, gradle.properties, gradle/wrapper/gradle-wrapper.properties, .gitignore
  • src/main/resources/fabric.mod.json, bettermace.mixins.json
  • src/main/java/dev/bettermace/BetterMace.java (entrypoint)
  • src/main/java/dev/bettermace/config/BetterMaceConfig.java
  • src/main/java/dev/bettermace/mixin/MaceItemMixin.java
  • README.md (RU)

Review & Testing Checklist for Human

This PR was not built or run locally — there is no JDK 21 / fabric-loom toolchain in the session, and the Minecraft/Yarn/Fabric-API artifacts were not fetched. Treat every interaction with Minecraft internals below as unverified.

  • Run ./gradlew build locally with JDK 21. Note: only gradle-wrapper.properties was committed — gradle-wrapper.jar, gradlew, and gradlew.bat are not in the repo, so you'll need to run gradle wrapper once (with a system Gradle 8.10.2) to generate them before ./gradlew build will work. Consider whether you want those wrapper files committed.
  • Verify Yarn method name postHurtEnemy actually exists on net.minecraft.item.MaceItem at yarn 1.21.4+build.8. The method was renamed from postHit somewhere in the 1.21.x line; if 1.21.4 yarn still uses a different name (or the mapping build number doesn't exist), the mixin will hard-fail at load (defaultRequire: 1). Pinned versions in gradle.properties: yarn=1.21.4+build.8, loader=0.16.9, fabric_api=0.114.0+1.21.4, loom=1.9-SNAPSHOT — please confirm these resolve.
  • In-game smoke test: install Fabric 1.21.4 + Fabric API + this mod, jump from ≥3 blocks onto a group of mobs holding a Mace, confirm (a) primary target still takes vanilla smash damage, (b) neighbors within radius take reduced damage and get pushed outward, (c) no double-damage on the primary target, (d) nothing fires when you hit on flat ground.
  • Verify Minecraft API surface used by the mixin matches 1.21.4 yarn: LivingEntity#damage(ServerWorld, DamageSource, float), EntityType#create(ServerWorld, SpawnReason), LightningEntity#setCosmetic / setChanneler / refreshPositionAfterTeleport, Entity#velocityModified field, ServerWorld#getEntitiesByClass. If any of these were renamed in 1.21.4 yarn, the mixin won't compile.
  • Sanity-check this even belongs in kinngg2/DeepSeek-Math — this repo is a Python ML research project; a Minecraft mod is a topical mismatch. If you wanted it in a different repo, say the word and I'll move it.

Notes

  • The bonus-damage formula (4/2/1 per block for 0–3 / 3–8 / 8+) is a reconstruction of vanilla, not a re-use of MaceItem.getBonusAttackDamage. If vanilla's exact thresholds differ in 1.21.4, the AOE damage numbers will drift slightly from "ideal."
  • Neighbors only receive the AOE-scaled bonus; they do not receive a "base" mace hit, so primary-target damage is never duplicated.
  • MaceItemMixin.java has an unused import net.minecraft.entity.Entity; — harmless warning, easy follow-up cleanup.
  • No Forge/NeoForge variant is included (README explains; would require Architectury or a parallel loader project).
  • No LICENSE file is present in the mod subdirectory, but build.gradle references one in jar { from("LICENSE") ... } — the from will silently no-op if the file is absent, but you may want to add one or remove that block.

Link to Devin session: https://app.devin.ai/sessions/fa8c614cc631433a9d395c4426214190
Requested by: @kinngg2

Adds a Fabric mod under minecraft-mods/bettermace that improves the
vanilla Mace by:
- Applying AOE damage on a smash attack scaled by fall distance
- Pushing nearby targets outward + smash particles/sound
- Optional lightning bolt on extreme falls (cosmetic by default)
- Optional self-bounce for the attacking player (Wind-Burst-style)
- All values are configurable via config/bettermace.json

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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