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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ jobs:
./gradlew "${gradle_args[@]}"
first="$RUNNER_TEMP/basemetals-first"
mkdir -p "$first"
cp build/libs/BaseMetals-3.0.1.114041.jar "$first/"
cp build/libs/BaseMetals-3.0.1.114041-sources.jar "$first/"
cp build/libs/BaseMetals-3.0.1.114041-javadoc.jar "$first/"
cp build/libs/*.jar "$first/"
cp build/release/SHA256SUMS "$first/"

- name: Rebuild and prove byte-identical archives
Expand All @@ -159,9 +157,9 @@ jobs:
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.0.1.114041.jar" build/libs/BaseMetals-3.0.1.114041.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.0.1.114041-sources.jar" build/libs/BaseMetals-3.0.1.114041-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.0.1.114041-javadoc.jar" build/libs/BaseMetals-3.0.1.114041-javadoc.jar
for jar in "$RUNNER_TEMP/basemetals-first/"*.jar; do
cmp "$jar" "build/libs/$(basename "$jar")"
done
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS

- name: Run exact-OreSpawn dedicated-server probe
Expand All @@ -178,18 +176,18 @@ jobs:
)
timeout 15m ./gradlew "${gradle_args[@]}"

- name: Stage the flat release bundle
run: |
mkdir -p build/release-bundle
cp build/libs/*.jar build/release/SHA256SUMS CHANGELOG.txt build/release-bundle/

- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.14.4-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-3.0.1.114041.jar
build/libs/BaseMetals-3.0.1.114041-sources.jar
build/libs/BaseMetals-3.0.1.114041-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
path: build/release-bundle/

- name: Upload bounded diagnostics on failure
if: failure()
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Base Metals 3.0.1.114041
Base Metals 3.0.2.114041 for Minecraft 1.14.4

- Fix bars in every material so straight runs, corners and junctions use the
vanilla connection model without overlapping posts or caps.
- Increase the ore overlay gap to 0.05 pixels to avoid flicker at shallow angles,
keeping the texture inside its sprite.

Base Metals 3.0.1.114041 for Minecraft 1.14.4
- Bring the finished 1.13.2 port to Minecraft 1.14.4 and Forge 28.2.26.
- Keep existing blocks, items, recipes, save identities, High/Low Fantasy
settings and material-based recipe discovery.
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ shields, bows, crossbows, arrows, and bolts. The mod also includes Crack
Hammers, scythes, metal anvils, the human detector, villager trades,
advancements, and extra loot to find in chests.

This is the Minecraft 1.14.4 version, `3.0.1.114041`, continued from the finished
This is the Minecraft 1.14.4 version, `3.0.2.114041`, continued from the finished
1.13.2 port. It keeps the historical `basemetals` block and item IDs, but no longer
needs MMDLib or Additional Loot Tables. OreSpawn places the ores, and Base
Metals supplies the metals and their recipes.
Expand All @@ -29,7 +29,7 @@ Armorer, Weaponsmith and Toolsmith professions introduced in Minecraft 1.14.
- Java 8
- OreSpawn `[4.1.0.114041,5.0.0)` on both client and server

Put `BaseMetals-3.0.1.114041.jar` and OreSpawn `4.1.0.114041` (or a later
Put `BaseMetals-3.0.2.114041.jar` and OreSpawn `4.1.0.114041` (or a later
compatible OreSpawn 4 build for 1.14.4) in the `mods` directory. MMDLib and
Additional Loot Tables are not dependencies. Mineralogy is optional.

Expand Down Expand Up @@ -195,10 +195,18 @@ from CurseMaven. The build checks its exact file ID and SHA-256 before release
auditing and packaged tests; no local OreSpawn build is needed.

Release artifacts use Maven coordinate
`zone.moddev.mc.basemetals:BaseMetals:3.0.1.114041`.
`zone.moddev.mc.basemetals:BaseMetals:3.0.2.114041`.

Report defects through the
[Base Metals issue tracker](https://github.com/MinecraftModDevelopmentMods/BaseMetals/issues).

Base Metals is licensed under [LGPL-2.1](LICENSE). Bundled or derived third-party
art is covered by the accompanying attribution and licence files.

## Bars and ore overlays

This version fixes all 26 material bars and increases the ore
overlay spacing to 0.05 pixels. The bars use Minecraft 1.14's own iron-bar
parts for straight runs, corners, ends and junctions. Ore overlays keep their
texture coordinates inside the sprite so the wider spacing does not pull in
neighbouring textures.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,5 @@ apply from: 'gradle/verification/generated-data.gradle'
apply from: 'gradle/ide/eclipse.gradle'
apply from: 'gradle/ide/intellij.gradle'
apply from: 'gradle/verification/packaged-forge.gradle'

apply from: 'gradle/normalize-javadoc-trees.gradle'
2 changes: 1 addition & 1 deletion docs/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ blocks cannot be reconstructed by Mojang's vanilla fixer alone, so Base Metals
installs a narrowly scoped migration hook before Forge reads an old world.

Always upgrade a copy and retain the original 1.10/1.12 world. Install Base
Metals `3.0.1.114041`, OreSpawn `4.1.0.114041`, and any other 1.14.4 mods needed
Metals `3.0.2.114041`, OreSpawn `4.1.0.114041`, and any other 1.14.4 mods needed
by that world. Do not carry MMDLib, Additional Loot Tables, the OreSpawn 3
plugin, or Base Metals' old fallback generator into the new instance.

Expand Down
22 changes: 22 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Releasing Base Metals for Minecraft 1.14.4

Use Java 17.0.1+12 for Gradle, Temurin 8u502-b07 for compilation and Java 25
for Mavenizer. Run `check build javadoc verifyReleaseArtifacts
writeReleaseChecksums`, then regenerate and verify the Eclipse launches.
Keep packaged gameplay tests local and finish manual testing before delivery.

Push the fork branch and open a PR to MMD's `master-1.14.4`. Wait for its checks
before merging. Compare all three jars from the merged CI bundle with the
locally qualified files, including their SHA-256 hashes.

Start the default-branch `deploy-release.yml` dispatcher with the four-part
release version and the CurseForge release level. It derives the target branch
from the version, checks the metadata and prior CI, builds a sealed bundle,
then publishes those same files to MMD Maven, CurseForge and GitHub. Live
publication requires `confirm_live_publication=true`.

Verify public downloads from all three services against the qualified hashes.
Check CurseForge's Minecraft version, loader and OreSpawn dependency as well.
Keep failed receipts, and retry only failed publishing jobs so an accepted
upload is not sent twice. Once Base Metals is available, update companion
mods to its released version and exact jar hash before publishing them.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mcp_version=20190829.143755
mod_id=basemetals
mod_name=Base Metals
mod_license=LGPL-2.1
mod_version=3.0.1.114041
mod_version=3.0.2.114041

# Maven coordinates and credits.
mod_group=zone.moddev.mc.basemetals
Expand Down
16 changes: 16 additions & 0 deletions gradle/normalize-javadoc-trees.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Java 8's doclet leaves enum siblings in platform-dependent order.
// Keep the full hierarchy while giving leaf-only sibling lists a stable order.
tasks.withType(Javadoc).configureEach {
inputs.property('javadocTreeOrder', 'lexical leaf siblings 1')
doLast {
fileTree(destinationDir) { include '**/*-tree.html' }.files.each { page ->
String original = page.getText('UTF-8')
String ordered = original.replaceAll(
/(<ul>\r?\n)((?:<li type="circle">[^\r\n]*<\/li>\r?\n){2,})(<\/ul>)/) {
all, opening, siblings, closing ->
opening + siblings.readLines().sort().join('\n') + '\n' + closing
}
if (ordered != original) page.setText(ordered, 'UTF-8')
}
}
}
4 changes: 2 additions & 2 deletions gradle/release/artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ tasks.register('verifyReleaseConfiguration') {
loaderCode: project.loader_code.toString(), javaVersion: project.java_version.toString(),
gradleJavaVersion: project.gradle_java_version.toString(),
curseForgeProjectId: project.curseforge_project_id.toString()]
def expected = [modVersion: '3.0.1.114041', modGroup: expectedMavenGroup,
def expected = [modVersion: '3.0.2.114041', modGroup: expectedMavenGroup,
minecraftVersion: '1.14.4', forgeVersion: '28.2.26',
forgeInstallerSha256: 'E68A0E2D589B2954C5D109A04B80747AC8C061ACABE074DB1607F9C2FD7D2CE1',
mappingChannel: 'snapshot', mappingVersion: '20190719-1.14.3',
Expand Down Expand Up @@ -255,7 +255,7 @@ tasks.register('verifyReleaseArtifacts') {
throw new GradleException('Release manifest contains the wrong identity')
}
String modsToml = zip.getInputStream(zip.getEntry('META-INF/mods.toml')).getText('UTF-8')
if (modsToml.contains('${') || !modsToml.contains('version="3.0.1.114041"')
if (modsToml.contains('${') || !modsToml.contains('version="3.0.2.114041"')
|| !modsToml.contains('versionRange="[4.1.0.114041,5.0.0)"')) {
throw new GradleException('Release mods.toml contains unresolved or incompatible metadata')
}
Expand Down
6 changes: 6 additions & 0 deletions gradle/verification/generated-data.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@ tasks.named('check') {
project.ext.baseMetalsBuild.putAll([
generateOreModels: generateOreModels
])

tasks.register('verifyBarModels', Exec) {
dependsOn verifyGeneratedData
commandLine 'node', '--test', 'tools/test_bar_models.js'
}
tasks.named('check') { dependsOn 'verifyBarModels' }
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package zone.moddev.mc.basemetals.testmod;

import java.util.*;
import net.minecraft.block.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.model.*;
import net.minecraft.state.IProperty;
import net.minecraft.util.Direction;
import net.minecraftforge.registries.ForgeRegistries;

/** Compare all connected bars against the target game's own iron bars. */
final class BarModelChecks {
static int run(Minecraft mc,String namespace){
int checks=0,materials=0;
for(Block block:ForgeRegistries.BLOCKS.getValues()){
if(!block.getRegistryName().getNamespace().equals(namespace)||!block.getRegistryName().getPath().endsWith("_bars"))continue;
materials++;
for(BlockState state:block.getStateContainer().getValidStates()){
BlockState vanilla=Blocks.IRON_BARS.getDefaultState();
for(IProperty property:vanilla.getProperties()){
IProperty actual=state.getBlock().getStateContainer().getProperty(property.getName());
if(actual!=null)vanilla=vanilla.with(property,state.get(actual));
}
Map<String,Integer> expected=geometry(mc,vanilla),actual=geometry(mc,state);
if(!actual.equals(expected))throw new IllegalStateException("Bars geometry differs from vanilla: "+state+" expected "+expected.size()+" faces, actual "+actual.size());
checks++;
}
}
if(materials==0)throw new IllegalStateException("No bars checked for "+namespace);
System.out.println("BARS_MODEL_CHECK PASS mod="+namespace+" materials="+materials+" states="+checks);
return checks;
}
private static Map<String,Integer> geometry(Minecraft mc,BlockState state){
IBakedModel model=mc.getBlockRendererDispatcher().getModelForState(state);
if(model==mc.getModelManager().getMissingModel())throw new IllegalStateException("Missing bars model "+state);
List<BakedQuad> quads=new ArrayList<>(model.getQuads(state,null,new Random(42)));
for(Direction side:Direction.values())quads.addAll(model.getQuads(state,side,new Random(42)));
Map<String,Integer> result=new TreeMap<>();
for(BakedQuad quad:quads){
if(quad.getSprite().getName().getPath().equals("missingno"))throw new IllegalStateException("Missing bars sprite "+state);
int[] data=quad.getVertexData();int stride=data.length/4;List<String> vertices=new ArrayList<>();
for(int v=0;v<4;v++)vertices.add(Math.round(Float.intBitsToFloat(data[v*stride])*1000000)+","+Math.round(Float.intBitsToFloat(data[v*stride+1])*1000000)+","+Math.round(Float.intBitsToFloat(data[v*stride+2])*1000000));
Collections.sort(vertices);String key=quad.getFace()+vertices.toString();result.merge(key,1,Integer::sum);
}
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ private static void validateClientContent(Minecraft minecraft) throws IOExceptio
validateBucketModel(minecraft, "mercury_bucket");
validateBucketModel(minecraft, "tin_bucket");
validateOreModels(minecraft);
BarModelChecks.run(minecraft, "basemetals");
minecraft.getResourceManager().getResource(
new ResourceLocation("basemetals", "textures/item/adamantine_sword.png"));
minecraft.getResourceManager().getResource(
Expand Down Expand Up @@ -425,10 +426,13 @@ private static void validateOreModel(IBakedModel model, Block block, String name
private static void validateOreVertices(BakedQuad quad, boolean overlay, String name) {
int[] vertices = quad.getVertexData();
int stride = vertices.length / 4;
float low = overlay ? -0.001F / 16 : 0;
float high = overlay ? 16.001F / 16 : 1;
float low = overlay ? -0.05F / 16 : 0;
float high = overlay ? 16.05F / 16 : 1;

for (int vertex = 0; vertex < 4; vertex++) {
float u = quad.getSprite().getUnInterpolatedU(Float.intBitsToFloat(vertices[vertex * stride + 4]));
float v = quad.getSprite().getUnInterpolatedV(Float.intBitsToFloat(vertices[vertex * stride + 5]));
require(u >= -0.01F && u <= 16.01F && v >= -0.01F && v <= 16.01F, name + " samples outside its texture sprite");
for (int axis = 0; axis < 3; axis++) {
float coordinate = Float.intBitsToFloat(vertices[vertex * stride + axis]);
require(Math.min(Math.abs(coordinate - low), Math.abs(coordinate - high)) < 0.000001F,
Expand Down
2 changes: 1 addition & 1 deletion src/clientIntegrationTest/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description='''Build-only packaged-client checks for Base Metals 1.14.4.'''
[[dependencies.basemetalsclientprobe]]
modId="basemetals"
mandatory=true
versionRange="[3.0.1.114041]"
versionRange="[3.0.2.114041]"
ordering="AFTER"
side="CLIENT"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,99 @@
"multipart": [
{
"apply": {
"model": "basemetals:block/adamantine_bars_post"
"model": "basemetals:block/adamantine_bars_post_ends"
}
},
{
"when": {
"north": "true"
"north": "false",
"east": "false",
"south": "false",
"west": "false"
},
"apply": {
"model": "basemetals:block/adamantine_bars_side"
"model": "basemetals:block/adamantine_bars_post"
}
},
{
"when": {
"north": "false"
"north": "true",
"east": "false",
"south": "false",
"west": "false"
},
"apply": {
"model": "basemetals:block/adamantine_bars_cap"
}
},
{
"when": {
"south": "true"
"north": "true"
},
"apply": {
"model": "basemetals:block/adamantine_bars_side_alt"
"model": "basemetals:block/adamantine_bars_side"
}
},
{
"when": {
"south": "false"
"north": "false",
"east": "true",
"south": "false",
"west": "false"
},
"apply": {
"model": "basemetals:block/adamantine_bars_cap_alt",
"model": "basemetals:block/adamantine_bars_cap",
"y": 90
}
},
{
"when": {
"west": "true"
"east": "true"
},
"apply": {
"model": "basemetals:block/adamantine_bars_side_alt",
"model": "basemetals:block/adamantine_bars_side",
"y": 90
}
},
{
"when": {
"north": "false",
"east": "false",
"south": "true",
"west": "false"
},
"apply": {
"model": "basemetals:block/adamantine_bars_cap",
"y": 270
"model": "basemetals:block/adamantine_bars_cap_alt"
}
},
{
"when": {
"east": "true"
"south": "true"
},
"apply": {
"model": "basemetals:block/adamantine_bars_side",
"model": "basemetals:block/adamantine_bars_side_alt"
}
},
{
"when": {
"north": "false",
"east": "false",
"south": "false",
"west": "true"
},
"apply": {
"model": "basemetals:block/adamantine_bars_cap_alt",
"y": 90
}
},
{
"when": {
"east": "false"
"west": "true"
},
"apply": {
"model": "basemetals:block/adamantine_bars_cap_alt"
"model": "basemetals:block/adamantine_bars_side_alt",
"y": 90
}
}
]
}
}
Loading
Loading