Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
"minecraft:copper_axe",
"minecraft:stone_axe",
"minecraft:mace",
"minecraft:wooden_axe"
"minecraft:wooden_axe",
"minecraft:wooden_spear",
"minecraft:stone_spear",
"minecraft:copper_spear",
"minecraft:iron_spear",
"minecraft:golden_spear",
"minecraft:diamond_spear",
"minecraft:netherite_spear"
Comment on lines +26 to +32
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Find project MC/version metadata to understand the target runtime
echo "=== Project Metadata ==="
fd 'gradle.properties|build.gradle|build.gradle.kts|fabric.mod.json|mods.toml|neoforge.mods.toml' 2>/dev/null | head -20

# Check common build/metadata files
echo -e "\n=== Checking for build files ==="
ls -la | grep -E 'build|gradle|maven' || echo "No build files found in root"

# 2) Inspect all spear IDs and namespaces in resources
echo -e "\n=== All spear references in resources ==="
rg -n '"[a-z0-9_\-]+:(wooden|stone|copper|iron|golden|diamond|netherite)_spear"' src/main/resources 2>/dev/null || echo "No spear IDs found with that pattern"

# 3) Check broader spear namespace usage
echo -e "\n=== All spear references (broader search) ==="
rg -n 'spear' src/main/resources 2>/dev/null | head -30

# 4) Check the weapons.json file specifically
echo -e "\n=== weapons.json content ==="
cat -n src/main/resources/resourcepacks/default/assets/itemswapper/itemgroups/v2/weapons.json 2>/dev/null | head -40

Repository: tr7zw/ItemSwapper

Length of output: 3864


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check the main fabric.mod.json for version requirements and dependencies
echo "=== Main fabric.mod.json ==="
cat -n src/main/resources/fabric.mod.json

echo -e "\n=== Version-specific fabric.mod.json (1.20.1) ==="
cat -n versions/1.20.1-fabric/src/main/resources/fabric.mod.json 2>/dev/null || echo "File not found"

echo -e "\n=== Version-specific fabric.mod.json (1.20.2) ==="
cat -n versions/1.20.2-fabric/src/main/resources/fabric.mod.json 2>/dev/null || echo "File not found"

# Check for gradle.properties to see version info
echo -e "\n=== gradle.properties ==="
cat -n gradle.properties 2>/dev/null | head -30

# Look for any build.gradle or build.gradle.kts
echo -e "\n=== build.gradle or build.gradle.kts ==="
find . -maxdepth 2 -name 'build.gradle*' -type f -exec cat -n {} \; 2>/dev/null | head -60

Repository: tr7zw/ItemSwapper

Length of output: 9353


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Try to read gradle.properties without head/tail restrictions
echo "=== gradle.properties full content ==="
wc -l gradle.properties 2>/dev/null && cat gradle.properties 2>/dev/null || echo "File empty or not found"

# Look for any version configuration in root files
echo -e "\n=== Checking for version in directory structure ==="
ls -la versions/ 2>/dev/null | grep -E 'fabric|neoforge' || echo "No version directories found"

# Search for MC version in any gradle file
echo -e "\n=== Searching for minecraft version in gradle files ==="
find . -maxdepth 3 -name 'build.gradle*' -type f 2>/dev/null | while read f; do
  echo "File: $f"
  grep -i -E 'minecraft|version' "$f" 2>/dev/null | head -10
done

# Check settings.gradle
echo -e "\n=== settings.gradle if exists ==="
cat settings.gradle 2>/dev/null || echo "No settings.gradle"

Repository: tr7zw/ItemSwapper

Length of output: 1045


🌐 Web query:

when were spears added to minecraft vanilla items 1.21

💡 Result:

Spears were added to vanilla Minecraft (Java Edition) in version 1.21.11 (the “Mounts of Mayhem” drop), which released on December 9, 2025. [1], [2]

Sources:
[1] Minecraft.net — Minecraft Java Edition 1.21.11 (official changelog) (minecraft.net)
[2] Minecraft Wiki (Fandom) — Java Edition 1.21.11 (minecraft.fandom.com)

Citations:


Remove spear entries or add version-conditional logic—spears do not exist in vanilla Minecraft before 1.21.11.

Lines 26–32 reference minecraft:*_spear items, which were not added to vanilla Minecraft until version 1.21.11 (released December 9, 2025). The project supports versions 1.19.4 through 1.21.11, meaning these entries will fail to resolve silently on roughly 92% of supported versions (1.19.4, 1.20.1, 1.20.2, 1.20.4, 1.20.6, 1.21.1, 1.21.3, 1.21.4, 1.21.5, 1.21.8, 1.21.10). Either remove these entries or implement version-specific item configuration to include them only for 1.21.11+.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/resources/resourcepacks/default/assets/itemswapper/itemgroups/v2/weapons.json`
around lines 26 - 32, The listed "minecraft:*_spear" entries
(minecraft:wooden_spear, stone_spear, copper_spear, iron_spear, golden_spear,
diamond_spear, netherite_spear) are only valid in 1.21.11+, so either remove
these spear entries from the weapons item group or implement version-conditional
logic so they are only included when the runtime/game version >= 1.21.11; to
fix, update the weapons.json item group to omit those spear IDs for older
versions or modify the loader that builds item groups to check the game version
and only inject the spear IDs for 1.21.11 and above (identify the weapons.json
item group and the code path that reads/merges item groups to add the
conditional logic).

],
"ignoreItems": [
"minecraft:netherite_axe",
Expand Down