Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
62 changes: 40 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Base Metals 1.20.1 CI
name: Base Metals 1.20.6 CI

on:
push:
branches:
- master-1.20.1
- master-1.20.6
- 'feature/**'
pull_request:
branches:
- master-1.20.1
- master-1.20.6

permissions:
contents: read

concurrency:
group: basemetals-1.20.1-${{ github.workflow }}-${{ github.ref }}
group: basemetals-1.20.6-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -26,11 +26,23 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install pinned Java 17 runtime and toolchain
- name: Install Java 25 for Mavenizer
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '17.0.1+12'
java-version: '25.0.3+9.0.LTS'

- name: Install Java 8 for the development launcher helper
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install pinned Java 21 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '21.0.7+6.0.LTS'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand All @@ -42,6 +54,12 @@ jobs:
bash gradle/stage-orespawn-release.sh "$mirror"
echo "repository=$mirror" >> "$GITHUB_OUTPUT"

- name: Test saved-item component comparisons
run: |
python3 -m venv "$RUNNER_TEMP/nbt-tests"
"$RUNNER_TEMP/nbt-tests/bin/pip" install nbtlib==2.0.4 numpy==2.4.6
"$RUNNER_TEMP/nbt-tests/bin/python" -m unittest discover -s tools/validation -p 'test_*.py'

- name: Build, test, and audit first candidate
run: |
chmod +x ./gradlew
Expand All @@ -50,19 +68,19 @@ jobs:
--no-daemon --stacktrace
first="$RUNNER_TEMP/basemetals-first"
mkdir -p "$first"
cp build/libs/BaseMetals-3.1.0.120011.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120011-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120011-javadoc.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120061.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120061-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120061-javadoc.jar "$first/"
cp build/release/SHA256SUMS "$first/"

- name: Rebuild and prove byte-identical archives
run: |
./gradlew clean assemble verifyReleaseArtifacts writeReleaseChecksums \
-PorespawnVerificationRepository="${{ steps.orespawn.outputs.repository }}" \
--no-daemon --stacktrace
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011.jar" build/libs/BaseMetals-3.1.0.120011.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-sources.jar" build/libs/BaseMetals-3.1.0.120011-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-javadoc.jar" build/libs/BaseMetals-3.1.0.120011-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120061.jar" build/libs/BaseMetals-3.1.0.120061.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120061-sources.jar" build/libs/BaseMetals-3.1.0.120061-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120061-javadoc.jar" build/libs/BaseMetals-3.1.0.120061-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS

- name: Run all required GameTests
Expand All @@ -74,14 +92,14 @@ jobs:
- name: Install official Forge packaged runtimes
id: forge-runtimes
run: |
server_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-server"
client_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-client"
installer="$RUNNER_TEMP/forge-1.20.1-47.4.10-installer.jar"
server_runtime="$RUNNER_TEMP/forge-1.20.6-50.2.0-server"
client_runtime="$RUNNER_TEMP/forge-1.20.6-50.2.0-client"
installer="$RUNNER_TEMP/forge-1.20.6-50.2.0-installer.jar"
mkdir -p "$server_runtime" "$client_runtime"
curl --fail --location --retry 3 \
--output "$installer" \
https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.10/forge-1.20.1-47.4.10-installer.jar
echo "1912760B4CB6B803D8A826DE603C9076B1DA71EC2765E9A1F8C1CA78F65278E3 $installer" | sha256sum --check --strict
https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar
echo "8789098B077F5486449311A11DC05E977FEB9430913CB15F30B21A2D8AA213EA $installer" | sha256sum --check --strict
(
cd "$server_runtime"
java -jar "$installer" --installServer
Expand Down Expand Up @@ -124,21 +142,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.20.1-${{ github.sha }}
name: BaseMetals-1.20.6-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-3.1.0.120011.jar
build/libs/BaseMetals-3.1.0.120011-sources.jar
build/libs/BaseMetals-3.1.0.120011-javadoc.jar
build/libs/BaseMetals-3.1.0.120061.jar
build/libs/BaseMetals-3.1.0.120061-sources.jar
build/libs/BaseMetals-3.1.0.120061-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

- name: Upload bounded diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.20.1-diagnostics-${{ github.sha }}
name: BaseMetals-1.20.6-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CodeQL
on:
push:
branches:
- master-1.20.1
- master-1.20.6
- 'feature/**'
pull_request:
branches:
- master-1.20.1
- master-1.20.6

permissions:
actions: read
Expand All @@ -24,11 +24,23 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install pinned Java 17 runtime and toolchain
- name: Install Java 25 for Mavenizer
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '17.0.1+12'
java-version: '25.0.3+9.0.LTS'

- name: Install Java 8 for the development launcher helper
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install pinned Java 21 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '21.0.7+6.0.LTS'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Validate Gradle Wrapper
on:
push:
branches:
- master-1.20.1
- master-1.20.6
- 'feature/**'
pull_request:
branches:
- master-1.20.1
- master-1.20.6

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ out
*.iws
*.iml
.idea
.run/

# gradle
build
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Base Metals 3.1.0.120061

- Port the released 1.20.1 version to Minecraft 1.20.6, Forge 50.2.0 and Java 21.
- Keep raw metals, Kiri's ore overlays, filled buckets, High/Low Fantasy and the existing gameplay fixes.
- Update equipment, item data, recipes, trades and loot for the new component and codec APIs.
- Check client and server content modes during Forge's configuration phase before joining a world.
- Keep names, enchantments and custom data when repairing or upgrading equipment.
- Retain saved arrow and bolt ammunition through the item-data conversion.
- Use the published OreSpawn 4.1.0.120061 release with the same provider rules and copper defaults.
- Retain compatible integration data without loading unsupported optional-mod jars.
- Keep the port's worlds, test probes and development output separate from public jars.

Base Metals 3.1.0.120011

- Port the 1.19.4 version to Minecraft 1.20.1 and Forge 47.4.10.
Expand Down
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Discord](https://img.shields.io/badge/Discord-MMD-green.svg?style=flat&logo=Discord)](https://discord.moddev.zone)
[![CurseForge downloads](https://cf.way2muchnoise.eu/full_base-metals_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
[![Supported Minecraft versions](https://cf.way2muchnoise.eu/versions/Minecraft_base-metals_all.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-1.20.1)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.20.1)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-1.20.6)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.20.6)

# Base Metals

Expand All @@ -12,21 +12,21 @@ shields, bows, crossbows, arrows, and bolts. The mod also includes Crack
Hammers, scythes, metal anvils, the human detector, villager trades,
advancements, and structure loot.

This is the Minecraft 1.20.1 Forge version, `3.1.0.120011`. It keeps the
fixes and features from 1.19.4, including raw metals, ore texture
This is the Minecraft 1.20.6 Forge version, `3.1.0.120061`. It keeps the
fixes and features from the released 1.20.1 version, including raw metals, ore texture
overlays and High/Low Fantasy modes. Existing Base Metals items and blocks keep
their registry IDs. OreSpawn handles ore generation; MMDLib and Additional Loot
Tables are no longer needed.

## Requirements

- Minecraft `1.20.1`
- Forge `47.4.10` or newer in the Minecraft 1.20.1 Forge 47 line
- A current Java 17 runtime
- OreSpawn `[4.1.0.120011,5.0.0)` on both client and server
- Minecraft `1.20.6`
- Forge `50.2.0` or newer in the Minecraft 1.20.6 Forge 50 line
- A current Java 21 runtime
- OreSpawn `[4.1.0.120061,5.0.0)` on both client and server

This version uses OreSpawn `4.1.0.120011`. Put
`BaseMetals-3.1.0.120011.jar` and a compatible OreSpawn JAR in the `mods`
This version uses OreSpawn `4.1.0.120061`. Put
`BaseMetals-3.1.0.120061.jar` and a compatible OreSpawn JAR in the `mods`
directory. MMDLib and Additional Loot Tables must not be carried forward from
an older installation. Mineralogy is optional.

Expand Down Expand Up @@ -58,7 +58,7 @@ Notable mechanics include:
- Scythes harvest a horizontal 3x3 area while respecting normal Forge block
break and protection events, drops, enchantments, and durability.
- Material shields can be upgraded at an anvil with one strictly harder tagged
plate while retaining their enchantments.
plate while retaining their enchantments, name and other item data.
- Bows fire arrows, while Base Metals' draw-and-release crossbows fire bolts.
Both the weapon and ammunition material contribute to the damage, before
enchantment bonuses. Picked-up projectiles keep their material and item data.
Expand Down Expand Up @@ -134,13 +134,13 @@ original. Read [Migration](docs/MIGRATION.md) before starting an upgraded world.

Forge item, block, and fluid tags are Base Metals' public compatibility API.

Integration data is included for Mekanism, Thermal Expansion, Tinkers' Construct
and Ender IO. These mods are optional. Use their Minecraft 1.20.1 builds; jars
for other Minecraft versions cannot be substituted.
Compatible tags and the existing recipe data for Mekanism, Thermal, Tinkers'
Construct and Ender IO are retained, but these integrations are not supported
on this target: those mods do not publish Forge 1.20.6 builds. Their older jars
must not be added to this instance. No optional integration API is required to
compile or launch Base Metals.

The normal development client loads only Base Metals and OreSpawn. Use the
separate optional-mod client profile when working on integrations. Its exact
dependencies and checksums are listed in `gradle/optional-mods.json`.
The normal development client loads only Base Metals and OreSpawn.

See [Compatibility](docs/COMPATIBILITY.md) for the supported processing chains,
tag aliases, copper rules, and intentionally retired legacy integrations. See
Expand All @@ -150,8 +150,9 @@ contracts.
## Building and contributing

Base Metals uses ForgeGradle `7.0.34`, Gradle `9.6.1`, official Minecraft
mappings, and the Java 17 toolchain. Initial Minecraft setup also uses Java 25
for Mavenizer; Minecraft and the mod still run on Java 17. A normal command-line
mappings, and the Java 21 toolchain. Initial Minecraft setup also uses Java 25
for Mavenizer. ForgeGradle also needs Java 8 for its setup helper; it does not
compile the mod or run Minecraft with Java 8. A normal command-line
build resolves the published OreSpawn release from CurseMaven:

```text
Expand All @@ -161,15 +162,16 @@ build resolves the published OreSpawn release from CurseMaven:
Generate and verify Eclipse launches with:

```text
./gradlew genEclipseRuns eclipse isolateEclipseProductionRuns verifyEclipseProductionClasspath
./gradlew prepareEclipse
```

IntelliJ users can import the Gradle project with Java 21 and run
`./gradlew prepareIntelliJ` to add client and server configurations. Both IDEs
use the same Gradle-managed Forge bootstrap and assets.

Use **runClient** for normal testing with Base Metals and OreSpawn only.
**runClientOptionalMods** uses a separate `run-optional-mods` folder for
compatibility testing with Mekanism, Mantle, Tinkers' Construct and CoFH Core.
Thermal and Ender IO are tested with packaged jars instead: their embedded
dependencies cannot be remapped by the development launcher.
Both profiles are available in Eclipse and through Gradle tasks.
The optional-mod profile uses a separate folder, but currently has no additional
mods on this target. Both profiles are available in Eclipse and through Gradle tasks.

Use the Gradle **generateResources** task when changing recipes, models or
translations. It updates the checked-in data; ordinary builds only check for
Expand All @@ -183,7 +185,7 @@ artifacts. GameTests, smoke probes, migration fixtures, and reference sources
are isolated from the published JAR.

Release artifacts use Maven coordinate
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120011`.
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120061`.

Report defects and compatibility problems through the
[Base Metals issue tracker](https://github.com/MinecraftModDevelopmentMods/BaseMetals/issues).
Expand Down
Loading
Loading