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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
set -euo pipefail
bundle="$RUNNER_TEMP/release-input"
mkdir -p "$bundle"
cp build/libs/BaseMetals-2.5.1.110021{,-sources,-javadoc}.jar "$bundle/"
cp build/libs/BaseMetals-2.6.0.110021{,-sources,-javadoc}.jar "$bundle/"
cp build/release/SHA256SUMS CHANGELOG.txt "$bundle/"
./gradlew verifyPreparedReleaseArtifacts verifyMavenCoordinates \
-PpreparedReleaseDir="$bundle" \
Expand Down Expand Up @@ -204,9 +204,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-2.5.1.110021.jar
build/libs/BaseMetals-2.5.1.110021-sources.jar
build/libs/BaseMetals-2.5.1.110021-javadoc.jar
build/libs/BaseMetals-2.6.0.110021.jar
build/libs/BaseMetals-2.6.0.110021-sources.jar
build/libs/BaseMetals-2.6.0.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2.6.0.110021 for 1.10.2

- Open Base Metals settings from the Mods list or the OreSpawn cog.
- High Fantasy is still the default. Choose Low Fantasy to limit which
materials can be made into equipment. Existing items and ore placement
stay the same. Restart to change modes; clients and servers must match.
- Molten metal burns on contact, even in shallow flows. Liquid mercury
still causes nausea.
- Require OreSpawn 4.1.6.110021 or a compatible newer 4.x release, with Forge
12.18.3.2511 or later. This picks up OreSpawn's fix for duplicate veins when
moving an OreSpawn 1 world without its converted configuration.

2.5.1.110021 for 1.10.2

- Require OreSpawn 4.1.2.110021 or a compatible newer 4.x release, with Forge
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Fantasy metals have been added to the Nether and the End: Cold Iron, Mithril, Ad

**Mercury**: This toxic liquid metal has many alchemical uses. The Mithril metal alloys requires mercury.

Molten metals burn like lava, even when you only touch the surface. Liquid
mercury causes nausea.

**Nickel**: This metal is as soft as copper, but it has alchemical properties and forms the invar metal alloy when mixed with iron.

**Platinum**:
Expand Down Expand Up @@ -76,14 +79,27 @@ Also known as a sledgehammer, this tool is designed for pulverizing rocks. Using
## Requirements

Install Forge `12.18.3.2511` or later and
[MMD OreSpawn `4.1.2.110021`](https://www.curseforge.com/minecraft/mc-mods/mmd-orespawn/files/9276430)
[MMD OreSpawn `4.1.6.110021`](https://www.curseforge.com/minecraft/mc-mods/mmd-orespawn/files/9518063)
or a newer compatible 4.x release for Minecraft 1.10.2. Base Metals no longer
includes its own fallback ore generator.

OreSpawn handles ore placement and imports old OreSpawn configuration files.
The eleven ore defaults are unchanged. See [ore generation and upgrades](docs/ORE_GENERATION.md)
for configuration locations and advice for existing worlds.

## Configuration

Open **Mods → Base Metals → Config** from the main menu, or use the Base Metals
cog in **Create World → OreSpawn → Mods**. Both open the same settings in
`config/BaseMetals.cfg`. Restart Minecraft or the server to apply changes.

**High Fantasy** is the default and keeps the usual recipes, including when
upgrading an old config. **Low Fantasy** restricts what you can make from each
material: for example, Adamantine still makes pickaxes, but not bows. Existing
items still load and work, and both modes use the same OreSpawn rules. Servers
and clients need to use the same setting. This does not change the separate
Fantasy Level settings in Base Gems or Modern Metals.

## Building and running from source

This branch uses ForgeGradle 7 and the Gradle wrapper, like the newer branches.
Expand All @@ -103,7 +119,7 @@ pass. Normal builds and tags do not publish anything.

## Installing

Install Forge and OreSpawn, then put `BaseMetals-2.5.1.110021.jar` in your
Install Forge and OreSpawn, then put `BaseMetals-2.6.0.110021.jar` in your
`mods` folder. Downloads are available on CurseForge and the repository's
Releases page once the version is published.

Expand All @@ -123,7 +139,7 @@ items cannot, by itself, repair those Java references. Base Metal Golems
its eighteen golems use the existing Base Metals blocks and ingots. Neither
add-on needs changing, and neither is required when playing without golems.

This release uses version `2.5.1.110021`. The final six digits identify Minecraft
This release uses version `2.6.0.110021`. The final six digits identify Minecraft
1.10.2 on Forge, following the same version format as the newer branches.
The mod ID, saved block and item names, resources and configuration names remain
`basemetals`; moving the Java packages does not rename anything in your world.
Expand All @@ -133,7 +149,7 @@ The mod ID, saved block and item names, resources and configuration names remain

New integrations should use `zone.moddev.mc.basemetals.init` for materials,
blocks and items. Maven builds use
`zone.moddev.mc.basemetals:BaseMetals:2.5.1.110021`. Crack Hammer recipes still
`zone.moddev.mc.basemetals:BaseMetals:2.6.0.110021`. Crack Hammer recipes still
use `com.mcmoddev.lib.registry.CrusherRecipeRegistry`; the bundled library API
has not moved.

Expand Down
10 changes: 5 additions & 5 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Temurin 8u502-b07 and Gradle on Temurin 17.0.1+12. Do not change Eclipse's own
runtime to Java 8: its Gradle and Minecraft runtimes are separate settings.

The compile and runtime target is Forge 12.18.3.2511 with stable-29 mappings.
OreSpawn 4.1.2.110021 is pinned through Curse Maven and verified against its
published SHA-256. Saved registry IDs and recipes have not changed.
OreSpawn 4.1.6.110021 is pinned through Curse Maven and verified against its
published SHA-256. Updating the dependency does not change saved registry IDs.

## Eclipse

Expand All @@ -29,7 +29,7 @@ cannot replace the mod version with a `${version}` placeholder. After changing
textures or other resources, refresh Gradle or run `prepareEclipse` again.

The launch tasks merge production classes and processed resources, so Minecraft
sees one mod root. Ordinary launches include the published OreSpawn 4.1.2.110021
sees one mod root. Ordinary launches include the published OreSpawn 4.1.6.110021
release. Other integration APIs, JUnit and the migration probes
are excluded. Keep personal worlds outside the development `run` directory.

Expand All @@ -43,7 +43,7 @@ transformed copies cannot retain a valid signature for the original bytes.
gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums prepareEclipse
```

The installable jar is `build/libs/BaseMetals-2.5.1.110021.jar`. Sources,
The installable jar is `build/libs/BaseMetals-2.6.0.110021.jar`. Sources,
Javadocs are written alongside it; checksums are in `build/release/SHA256SUMS`. The mapped development jar
is kept separately under `build/libs-dev`; it is not the jar to install in a
normal Minecraft instance. Building never uploads anything.
Expand Down Expand Up @@ -80,7 +80,7 @@ with `-PpackagedForgeRuntimeRoot=<server-directory>`. Python 3 needs `nbtlib`
keep a failed run before cleaning the build directory.

The shared **Release Base Metals** workflow lives on the repository's default
branch. Version `2.5.1.110021` selects `master-1.10.2`; it requires successful
branch. Version `2.6.0.110021` selects `master-1.10.2`; it requires successful
CI for the exact source commit and explicit publication confirmation. It builds
one candidate, then publishes those same files to MMD Maven, CurseForge and
GitHub, in that order. A tag alone only validates the candidate.
Expand Down
2 changes: 1 addition & 1 deletion docs/ORE_GENERATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ore generation in Minecraft 1.10.2

Base Metals now requires MMD OreSpawn 4.1.2.110021 or a newer compatible 4.x
Base Metals now requires MMD OreSpawn 4.1.6.110021 or a newer compatible 4.x
release. OreSpawn is the only ore-generation engine; Base Metals no longer
ships its old OS3 plugin or fallback generator. This also raises the minimum
Forge version to 12.18.3.2511.
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mappings_version=29-1.10.2

mod_id=basemetals
mod_group=zone.moddev.mc.basemetals
mod_version=2.5.1.110021
mod_version=2.6.0.110021
mod_artifact=BaseMetals
loader_name=forge
loader_code=1
Expand All @@ -26,5 +26,5 @@ curseforge_project_id=240967
cf_requirements=mmd-orespawn
orespawn_curse_project_id=245586
coreplugin=zone.moddev.mc.basemetals.compat.BaseMetalsLoadingPlugin
orespawn_version=4.1.2.110021
orespawn_version_range=[4.1.2.110021,5.0.0)
orespawn_version=4.1.6.110021
orespawn_version_range=[4.1.6.110021,5.0.0)
6 changes: 3 additions & 3 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ tasks.register('verifyReleaseDependencies') {
doLast {
def artifacts = configurations.legacyModArtifacts.resolvedConfiguration.resolvedArtifacts
def orespawn = specs.find { it.id == 'orespawn' }
if (orespawn.coordinate != 'curse.maven:mmd-orespawn-245586:9276430'
|| orespawn.sha256 != '4D4975421FEEBF17505056306D06B0344D7A4553B6275885D7C5C5065B0348A6') {
throw new GradleException('Use the verified OreSpawn 4.1.2.110021 release.')
if (orespawn.coordinate != 'curse.maven:mmd-orespawn-245586:9518063'
|| orespawn.sha256 != '05DB7CBFAADC815D6A713DACDFB9F0647BCED49CCFC357FB2FF010E95BD1379F') {
throw new GradleException('Use the verified OreSpawn 4.1.6.110021 release.')
}
specs.each { spec ->
def parts = spec.coordinate.split(':')
Expand Down
2 changes: 1 addition & 1 deletion gradle/dependencies.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{"id":"orespawn","coordinate":"curse.maven:mmd-orespawn-245586:9276430","sha256":"4D4975421FEEBF17505056306D06B0344D7A4553B6275885D7C5C5065B0348A6","repository":"https://www.cursemaven.com","runtime":true},
{"id":"orespawn","coordinate":"curse.maven:mmd-orespawn-245586:9518063","sha256":"05DB7CBFAADC815D6A713DACDFB9F0647BCED49CCFC357FB2FF010E95BD1379F","repository":"https://www.cursemaven.com","runtime":true},
{"id":"alt","coordinate":"curse.maven:additional-loot-tables-243157:2604973","sha256":"DFDEE18663A0CBC3A811E442C7B20F34F1765B1D36C6284CB3B8B8EAA3FC5620","repository":"https://www.cursemaven.com"},
{"id":"mantle","coordinate":"slimeknights.mantle:Mantle:1.10.2-1.1.5.207","sha256":"520499E1329EA57DB3D7ABA671B30A0CC7DA60C02C97828CFAF57778B0923832","repository":"https://dvs1.progwml6.com/files/maven"},
{"id":"tconstruct","coordinate":"slimeknights:TConstruct:1.10.2-2.6.5.11","sha256":"E33061BEFB4DA60B2EF79016A022C434149DDF1E573A01EFD2F202F03904E52D","repository":"https://dvs1.progwml6.com/files/maven"},
Expand Down
15 changes: 11 additions & 4 deletions gradle/release/artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tasks.register('verifyReleaseConfiguration') {
group = 'verification'
dependsOn tasks.named('verifyJava8Toolchain')
doLast {
if (project.group != 'zone.moddev.mc.basemetals' || project.version != '2.5.1.110021'
if (project.group != 'zone.moddev.mc.basemetals' || project.version != '2.6.0.110021'
|| project.minecraft_version != '1.10.2' || project.forge_version != '12.18.3.2511'
|| project.mappings_channel != 'stable' || project.mappings_version != '29-1.10.2') {
throw new GradleException('Base Metals target, mappings or Maven identity changed.')
Expand All @@ -47,8 +47,8 @@ tasks.register('verifyReleaseConfiguration') {
if (!source.contains('VERSION = "' + project.version + '"') || !source.contains('MODID = "basemetals"')) {
throw new GradleException('The mod identity differs from the build metadata.')
}
if (project.orespawn_version != '4.1.2.110021'
|| project.orespawn_version_range != '[4.1.2.110021,5.0.0)'
if (project.orespawn_version != '4.1.6.110021'
|| project.orespawn_version_range != '[4.1.6.110021,5.0.0)'
|| !source.contains('required-after:orespawn@' + project.orespawn_version_range)
|| !source.contains('required-after:Forge@[12.18.3.2511,)')) {
throw new GradleException('The OreSpawn or Forge runtime requirement changed.')
Expand Down Expand Up @@ -117,7 +117,14 @@ def auditJars = { File directory ->
throw new GradleException('Incorrect processed mcmod.info.')
}
int classes = zip.entries().count { it.name.endsWith('.class') }
if (classes != 218 || zip.getEntry('cyano/basemetals/init/Blocks.class') == null
def configClasses = [
'client/BaseMetalsGuiFactory', 'client/BaseMetalsConfigScreen',
'content/ContentAcquisition', 'content/ContentMode', 'content/ContentModeNetwork',
'content/ContentPolicy', 'content/MaterialForm'
]
if (classes != 218 + configClasses.size()
|| configClasses.any { zip.getEntry("zone/moddev/mc/basemetals/${it}.class") == null }
|| zip.getEntry('cyano/basemetals/init/Blocks.class') == null
|| zip.getEntry('META-INF/basemetals-legacy-api.list') == null) {
throw new GradleException('The compatibility-layer class inventory changed.')
}
Expand Down
19 changes: 19 additions & 0 deletions gradle/verification/legacy-runtime.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ sourceSets {
java.srcDirs = ['tools/validation/legacy110/capture-probe']
compileClasspath = sourceSets.main.compileClasspath
}
fantasyProbe {
java.srcDirs = ['tools/validation/legacy110/fantasy-probe']
compileClasspath = sourceSets.main.output + sourceSets.main.compileClasspath
}
}

def captureJar = tasks.register('captureProbeJar', Jar) {
Expand Down Expand Up @@ -79,6 +83,21 @@ tasks.register('migrationProbeJar', Jar) {
}
}

def fantasyProbe = tasks.register('fantasyProbeJar', Jar) {
group = 'verification'
archiveFileName = 'fantasy-probe.jar'
destinationDirectory = layout.buildDirectory.dir('test-mods')
from sourceSets.fantasyProbe.output
}
def packagedFantasyProbe = renamer.classes(fantasyProbe) {
map.from minecraft.dependency.toSrgFile
output = layout.buildDirectory.file('test-mods/fantasy-probe-packaged.jar')
}
tasks.register('packagedFantasyProbeJar') {
group = 'verification'
dependsOn packagedFantasyProbe
}

tasks.register('packagedForgeRuntimeTest', Exec) {
group = 'verification'
description = 'Tests OS1/OS3 imports, overrides, reloads and the vanilla takeover switch.'
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/mcmoddev/lib/block/BlockMoltenFluid.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import javax.annotation.Nonnull;

import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.DamageSource;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fluids.Fluid;

/**
Expand All @@ -20,4 +26,18 @@ public class BlockMoltenFluid extends net.minecraftforge.fluids.BlockFluidClassi
public BlockMoltenFluid(@Nonnull final Fluid fluid) {
super(fluid, Material.LAVA);
}

@Override
public void onEntityCollidedWithBlock(final World world, final BlockPos pos,
final IBlockState state, final Entity entity) {
super.onEntityCollidedWithBlock(world, pos, state, entity);
if (world.isRemote || !(entity instanceof EntityLivingBase) || entity.isImmuneToFire()) return;
if (entity.getEntityBoundingBox().minY >= pos.getY() + getFluidHeightForRender(world, pos)) return;

// Vanilla shrinks the lava contact bounds and handles damage once the entity is deeper.
if (!entity.isInLava()) {
entity.attackEntityFrom(DamageSource.lava, 4.0F);
entity.setFire(15);
}
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/mcmoddev/lib/init/Fluids.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import zone.moddev.mc.basemetals.data.MaterialNames;
import com.mcmoddev.lib.block.BlockMoltenFluid;
import com.mcmoddev.lib.block.InteractiveFluidBlock;
import com.mcmoddev.lib.data.SharedStrings;
import com.mcmoddev.lib.fluids.CustomFluid;
import com.mcmoddev.lib.material.MMDMaterial;

import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.MobEffects;
Expand Down Expand Up @@ -109,7 +109,7 @@ protected static BlockFluidClassic addFluidBlock(@Nonnull final MMDMaterial mate
}

if (!name.equals(MaterialNames.MERCURY)) {
block = new BlockFluidClassic(material.getFluid(), Material.LAVA);
block = new BlockMoltenFluid(material.getFluid());
} else {
block = new InteractiveFluidBlock(getFluidByName(name), false,
(final World w, final EntityLivingBase e) -> {
Expand Down
17 changes: 11 additions & 6 deletions src/main/java/com/mcmoddev/lib/init/VillagerTrades.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected static void registerCommonTrades() {

for (final Names name : Arrays.asList(Names.HELMET, Names.CHESTPLATE, Names.LEGGINGS,
Names.BOOTS)) {
if (material.hasItem(name)) {
if (canTrade(material, name)) {
final ItemStack itemStack = material.getItemStack(name);
final ITradeList[] armorTrades = makeTradePalette(makePurchasePalette(
emeraldPurch + (int) (material.getStat(MaterialStats.HARDNESS) / 2),
Expand All @@ -112,7 +112,7 @@ protected static void registerCommonTrades() {
}
}
}
if (material.hasItem(Names.CRACKHAMMER)) {
if (canTrade(material, Names.CRACKHAMMER)) {
final ItemStack itemStack = material.getItemStack(Names.CRACKHAMMER);
final ITradeList[] hammerTrades = makeTradePalette(
makePurchasePalette(emeraldPurch, itemStack));
Expand All @@ -128,7 +128,7 @@ protected static void registerCommonTrades() {
// enchantedHammerTrades);
}
}
if (material.hasItem(Names.SWORD)) {
if (canTrade(material, Names.SWORD)) {
final ItemStack itemStack = material.getItemStack(Names.SWORD);
final ITradeList[] swordTrades = makeTradePalette(makePurchasePalette(
(emeraldPurch + (int) (material.getBaseAttackDamage() / 2)) - 1,
Expand All @@ -153,15 +153,15 @@ protected static void registerCommonTrades() {
}
}
for (final Names name : Arrays.asList(Names.AXE, Names.HOE, Names.SHOVEL)) {
if (material.hasItem(name)) {
if (canTrade(material, name)) {
final ItemStack itemStack = material.getItemStack(name);
final ITradeList[] toolTrades = makeTradePalette(
makePurchasePalette(emeraldPurch, itemStack));
VillagerTradeHelper.insertTrades(SMITH_RL, TOOL_SMITH_ID, tradeLevel,
toolTrades);
}
}
if (material.hasItem(Names.PICKAXE)) {
if (canTrade(material, Names.PICKAXE)) {
final ItemStack itemStack = material.getItemStack(Names.PICKAXE);
final ITradeList[] pickaxeTrades = makeTradePalette(
makePurchasePalette(emeraldPurch, itemStack));
Expand All @@ -178,7 +178,7 @@ protected static void registerCommonTrades() {
// enchantedPickaxeTrades);
}
}
if (material.hasItem(Names.INGOT)) {
if (canTrade(material, Names.INGOT)) {
final ItemStack itemStack = material.getItemStack(Names.INGOT, 12);
if ((!itemStack.getItem().equals(net.minecraft.init.Items.EMERALD))
&& (!itemStack.getItem().equals(net.minecraft.init.Items.DIAMOND))) {
Expand All @@ -198,6 +198,11 @@ protected static void registerCommonTrades() {
commitTrades(tradesTable);
}

private static boolean canTrade(final MMDMaterial material, final Names form) {
return material.hasItem(form) && zone.moddev.mc.basemetals.content.ContentAcquisition
.allowsIntegrationOutput(material.getItemStack(form));
}

protected static void registerModSpecificTrades() {
}

Expand Down
Loading
Loading