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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/RealisticDeposits-0.4.0.110021.jar
build/libs/RealisticDeposits-0.4.0.110021-sources.jar
build/libs/RealisticDeposits-0.4.0.110021-javadoc.jar
build/libs/RealisticDeposits-0.5.0.110021.jar
build/libs/RealisticDeposits-0.5.0.110021-sources.jar
build/libs/RealisticDeposits-0.5.0.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
required: true
default: false
type: boolean
expected_checksums_sha256:
description: SHA-256 of the independently verified validation bundle's SHA256SUMS file.
required: false
type: string

permissions:
actions: read
Expand Down Expand Up @@ -382,6 +386,8 @@ jobs:

- name: Stage the immutable release artifact
id: artifact
env:
EXPECTED_CHECKSUMS_SHA256: ${{ inputs.expected_checksums_sha256 }}
run: |
set -euo pipefail
bundle="$RUNNER_TEMP/release-bundle"
Expand All @@ -392,6 +398,13 @@ jobs:
cp build/release/SHA256SUMS "$bundle/"
cp CHANGELOG.md "$bundle/"
(cd "$bundle" && sha256sum --check SHA256SUMS)
if [[ -n "$EXPECTED_CHECKSUMS_SHA256" ]]; then
if [[ ! "$EXPECTED_CHECKSUMS_SHA256" =~ ^[0-9a-fA-F]{64}$ ]]; then
echo "Expected checksum manifest SHA-256 must contain 64 hexadecimal digits" >&2
exit 1
fi
printf '%s %s\n' "${EXPECTED_CHECKSUMS_SHA256,,}" "$bundle/SHA256SUMS" | sha256sum --check -
fi
echo "name=RealisticDeposits-${{ needs.preflight.outputs.minecraft_version }}-${{ needs.preflight.outputs.loader_name }}-${{ needs.preflight.outputs.release_sha }}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> "$GITHUB_OUTPUT"

- name: Upload immutable release artifact
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.5.0.110021

Alpha for Minecraft 1.10.2.

- Add compact lapis lenses with pinching edges and connected richer pockets.
Keep 15% ordinary background lapis, with native drops and Fortune behaviour.
- Fit lenses into natural marble when Mineralogy strata are active. Use natural
vanilla stone variants otherwise, without adding rocks or replacing terrain.
- Attempt gradual entrances and short workings at suitable lapis districts,
leaving most of the deposit available to mine.
- Keep lapis settings in a separate catalogue. Existing worlds retain their
captured rules, background supply and saved workings; no retrogen is added.
- Add lapis previews, an isolated testing launch and packaged generation checks.

## 0.4.0.110021

Beta for Minecraft 1.10.2.
Expand Down
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@
![Realistic Deposits logo](src/main/resources/assets/realisticdeposits/textures/logo.png)

Realistic Deposits makes finding ore a reason to explore, then build a proper
mine. Rare iron districts, layered coalfields, diamond pipes and gold veins
give you deposits worth returning to, with old workings leading into some of them.
mine. Rare iron districts, layered coalfields, diamond pipes, gold veins and
lapis lenses give you deposits worth returning to, with old workings leading
into some of them.
Small pockets of diamond- and gold-bearing river gravel offer another way to prospect.
It runs on [MMD OreSpawn](https://github.com/MinecraftModDevelopmentMods/OreSpawn).

The project starts with Minecraft 1.10.2 and is intended to follow the
maintained OreSpawn branches across Forge and NeoForge.

Version 0.4.0.110021 is a beta for Minecraft 1.10.2. It adds gold
veins and linked river placers to the existing deposits and stepped workings.
Existing worlds keep their settings and saved mine layouts. Back up important
worlds before updating.
Version 0.5.0.110021 is an alpha for Minecraft 1.10.2. It adds rare, compact
lapis lenses and short abandoned workings, with 15% of ordinary background
lapis retained by default. Try a fresh world to see the new rules: existing
worlds keep their settings, generated chunks and saved mine layouts. Back up
important worlds before updating.

## Current features

Expand All @@ -39,15 +41,19 @@ worlds before updating.
or reshaping rivers. See [diamond deposits](docs/DIAMONDS.md).
- Steep gold veins with rich shoots, lean stretches and linked river gravel.
See [gold deposits](docs/GOLD.md).
- Compact lapis lenses with richer pockets and short workings. Natural marble
hosts them when Mineralogy strata are active; ordinary stone is used otherwise.
See [lapis deposits](docs/LAPIS.md).
- Configurable support for vanilla and modded resources.
- Safe generation that avoids air, fluids, bedrock, block entities, structures,
and undeclared host blocks.
- Live reload for iron and coal geometry. Gold, diamond and other structural
- Live reload for iron and coal geometry. Lapis, gold, diamond and other structural
changes wait until restart.
- An entry in both Forge's Mods configuration and OreSpawn's World Settings.
- Abandoned workings with sloping, stepped entrances and short underground galleries.
New defaults attempt them at every iron formation, coalfield, diamond pipe
and goldfield where safe. River placers stay untouched. See the [mine settings](docs/ABANDONED_MINES.md).
and goldfield, plus each lapis district, where safe. River placers stay untouched.
See the [mine settings](docs/ABANDONED_MINES.md).

Coalfields can already use Mineralogy's existing shale, siltstone and
conglomerate. Wider catalogues for Mineralogy, Base Metals, Modern Metals,
Expand Down Expand Up @@ -76,6 +82,7 @@ config/realisticdeposits/deposits/vanilla.json
config/realisticdeposits/deposits/coal.json
config/realisticdeposits/deposits/diamonds.json
config/realisticdeposits/deposits/gold.json
config/realisticdeposits/deposits/lapis.json
```

The supplied definition describes one rare iron district using a 640–960 block
Expand All @@ -101,6 +108,13 @@ increases successful drops. The gold catalogue keeps 15% ordinary background
gold; the larger deposits are deliberately unevenly distributed. Their total
reward is not forced to match vanilla.

Lapis occurs in smaller, irregular lenses rather than huge ore-filled layers.
With physical Mineralogy strata, lenses fit into natural marble; limestone,
dolomite and decorative marble are not substitutes. Without those strata,
natural vanilla stone variants provide a simpler setting. The separate lapis
catalogue keeps 15% background generation. A discovery can supply a lasting
reserve because each vanilla lapis ore block drops several lapis pieces.

Deposits only affect newly generated chunks. Changing these settings does not
retrogen, replace, or rewrite an existing chunk.

Expand Down Expand Up @@ -146,7 +160,7 @@ formations:

`reload` requires operator permission. For iron and coal it applies `enabled`,
selection, shape, height, geome, family, and alignment changes. Diamond geometry
and source links require a restart, as do gold settings. Resource,
and source links require a restart, as do gold and lapis settings. Resource,
dimension, host, biome-filter, interaction-policy, scale, added, and removed
definition changes are structural and take effect after restart. Abandoned-mine
settings are also captured with the world's deposit definition. New provider
Expand Down Expand Up @@ -190,6 +204,7 @@ The [mine-testing walkthrough](tools/qualification/MINES_TESTING.md) uses a
separate Eclipse profile and disposable saves for the new workings.
For coalfields, use `prepareCoalMeasuresManual` and the
[coal-testing walkthrough](tools/qualification/COAL_TESTING.md).
For lapis, see the [lapis walkthrough](tools/qualification/LAPIS_TESTING.md).

Hosted CI/CD keeps to builds, unit/helper tests, static checks, reproducible
jars, dependency hashes and ordinary Eclipse launch definitions. It does not
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -649,3 +649,4 @@ apply from: 'gradle/release.gradle'
apply from: 'gradle/coal-manual.gradle'
apply from: 'gradle/diamond-manual.gradle'
apply from: 'gradle/gold-manual.gradle'
apply from: 'gradle/lapis-manual.gradle'
68 changes: 68 additions & 0 deletions docs/LAPIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Finding lapis

Lapis is a smaller discovery than an iron district or a goldfield. Look for
compact lenses with pinching edges and richer pockets, rather than a solid
blue wall. A short worked section can lead you into a useful reserve without
excavating most of it for you.

The inspiration is marble-hosted lapis such as
[Sar-e-Sang in Afghanistan](https://iugs-geoheritage.org/geoheritage_sites/the-sar-e-sang-lapis-lazuli-deposit/).
There, lapis occurs in lenses and layers associated with altered marble.
This update represents that general arrangement, not the heat, fluids and
chemical reactions that formed it.

## With Mineralogy

When physical strata are active, lenses are fitted into natural marble.
Regions without a suitable marble interval are rejected. Ordinary limestone,
dolomite, polished marble, bricks and other decorative blocks do not qualify.
The ore replaces only the matching natural host; it does not manufacture a
marble band or turn terrain replacement on.

There is no new skarn rock or other carrier block in this update. Nor is every
marble layer a lapis deposit: regional selection still makes discoveries rare.

## Without physical strata

Without Mineralogy, or with its physical strata disabled, the same lenses use
natural vanilla stone, granite, diorite and andesite. Polished variants remain
excluded. This is a simpler visual approximation, not a claim that lapis
normally forms in every one of those rocks.

OreSpawn's geological classification still helps choose districts without
replacing terrain. Older geology that lacks modern classification uses a
rarer, deterministic approximation instead. Its settings are left alone.

Other terrain generators need to support safe sampling. If they do not,
lapis lenses are skipped and a message is written to the log; the mod will
not generate neighbouring chunks or replace unfamiliar rocks to find a site.

## Mining and rewards

The generated block is ordinary Minecraft lapis ore. In 1.10.2 it drops four
to eight pieces of lapis lazuli, averaging six before Fortune. Fortune increases
that yield; Silk Touch returns the ore block instead. No new processing
recipes, lapis grades or river placers are added.

The default catalogue retains 15% ordinary background lapis. New lenses are
deliberately concentrated, and their reward is not forced to equal vanilla's
overall supply. Structures, caves and water can interrupt a deposit or prevent
a safe mine entrance. Not every planned lens will be fully recoverable.

## Settings and existing worlds

Settings live in `config/realisticdeposits/deposits/lapis.json`. Defaults use
64-chunk regions, a 50% candidate chance before geological rejection and one
to three lenses per accepted district. Lengths are 64-160 blocks, widths
12-24 and thicknesses 1-4, within Y8-128 and below the natural surface.

New files are copied only when absent. Existing catalogues are not overwritten,
and existing world profiles do not silently receive lapis rules or reduced
background generation. Previously generated chunks and saved mine layouts
remain unchanged. Back up a world before editing its captured OreSpawn profile.

Lapis geometry and policy settings are structural: restart after editing them.
The additive, hybrid and replacement policies use the same OreSpawn controls
as the other deposits, including imported settings and custom channels.

For a separate test world, follow the [lapis walkthrough](../tools/qualification/LAPIS_TESTING.md).
14 changes: 8 additions & 6 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ The publication guard still rejects local OreSpawn candidates; a release must
use the public dependency, not an experimental jar.

The **Release Realistic Deposits** action runs from the repository's default
branch. Enter the full numeric version, such as `0.4.0.110021`; the final
branch. Enter the full numeric version, such as `0.5.0.110021`; the final
component identifies the Minecraft version and loader. CurseForge's alpha,
beta or release label is separate from the numeric version.

First run with **mode: validate**. This checks the branch, version, Java
settings and successful CI, then builds and checksums a release bundle. It
does not create a tag or upload anything.

To publish, select **mode: publish**, choose **beta**, and tick the explicit
publication confirmation. The workflow requires all four secrets:
To publish, select **mode: publish**, choose the intended CurseForge channel
(**alpha** for 0.5.0.110021), and tick the explicit publication confirmation.
Supply the SHA-256 of the verified validation bundle's `SHA256SUMS` file as
`expected_checksums_sha256` to require an exact match before publication.
The workflow requires all four secrets:

- `CURSEFORGE_TOKEN`
- `MAVEN_UPLOAD_URL`
Expand All @@ -25,9 +28,8 @@ The upload order is Maven, CurseForge, then GitHub. Each job downloads the
same immutable bundle and checks its hashes. OreSpawn is a required
CurseForge dependency. The current project ID is `1689703`.

Beta is the default CurseForge channel for this update. The numeric version
stays unchanged, and the GitHub release remains a prerelease. Validation mode
is still the safe default; changing the channel does not authorize an upload.
The channel does not change the numeric version or GitHub prerelease status.
Validation mode is the default; changing the channel does not authorize an upload.

Do not upload a second file because the first is awaiting moderation. If a
job fails after an upload, check its receipt and public destination before
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gradle_java_version=17
mod_id=realisticdeposits
mod_name=Realistic Deposits
mod_license=LGPL-2.1
mod_version=0.4.0.110021
mod_version=0.5.0.110021
mod_group=zone.moddev.mc.realisticdeposits
mod_authors=SkyBlade1978, the MMD Team
mod_description=Rare, massive, and geologically aware ore deposits powered by MMD OreSpawn.
Expand Down
42 changes: 42 additions & 0 deletions gradle/lapis-manual.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Lapis testing has its own settings and saves, separate from ordinary launches.
tasks.named('isolateEclipseProductionRuns') {
doLast {
[['runClient.launch', 'runLapisDepositsClient.launch'],
['runServer.launch', 'runLapisDepositsServer.launch']].each { pair ->
String contents = file(pair[0]).getText('UTF-8')
contents = contents.replaceAll(
/(<stringAttribute key="org\.eclipse\.jdt\.launching\.WORKING_DIRECTORY" value=")[^"]*("\/>)/,
'$1' + file('run-lapis-deposits').absolutePath.replace('\\', '\\\\') + '$2')
file(pair[1]).setText(contents.replace('\r\n', '\n'), 'UTF-8')
}
}
}

tasks.named('verifyEclipseProductionClasspath') {
doLast {
['runLapisDepositsClient.launch', 'runLapisDepositsServer.launch'].each { name ->
String contents = file(name).getText('UTF-8').replace('\\', '/')
if (!contents.contains('run-lapis-deposits') || !contents.contains('ATTR_EXCLUDE_TEST_CODE')) {
throw new GradleException("Lapis launch is not isolated: ${name}")
}
}
}
}

tasks.register('prepareLapisDepositsManual') {
group = 'verification'
description = 'Prepares separate lapis-testing settings and Eclipse launches.'
dependsOn tasks.named('verifyEclipseProductionClasspath')
doLast {
['vanilla', 'coal', 'diamonds', 'gold', 'lapis'].each { name ->
File target = file("run-lapis-deposits/config/realisticdeposits/deposits/${name}.json")
if (!target.isFile()) {
target.parentFile.mkdirs()
target.setText(file("src/main/resources/assets/realisticdeposits/defaults/${name}.json")
.getText('UTF-8').replace('\r\n', '\n'), 'UTF-8')
}
}
logger.lifecycle('Use runLapisDepositsClient.launch and tools/qualification/LAPIS_TESTING.md.')
logger.lifecycle('Existing settings and saves were left alone. Create a fresh test world.')
}
}
2 changes: 1 addition & 1 deletion gradle/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ tasks.register('verifyJavadocOrdering') {
tasks.register('verifyReleaseConfiguration') {
group = 'verification'
doLast {
if (project.mod_version != '0.4.0.110021'
if (project.mod_version != '0.5.0.110021'
|| project.curseforge_project_id != '1689703'
|| project.mod_artifact != 'RealisticDeposits'
|| project.java_version != '8' || project.gradle_java_version != '17'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import zone.moddev.mc.realisticdeposits.generation.MineWorkingsGenerator;
import zone.moddev.mc.realisticdeposits.generation.DiamondPattern;
import zone.moddev.mc.realisticdeposits.generation.GoldPattern;
import zone.moddev.mc.realisticdeposits.generation.LapisPattern;
import zone.moddev.mc.realisticdeposits.content.ModContent;
import zone.moddev.mc.realisticdeposits.integration.OreSpawnIntegration;
import zone.moddev.mc.realisticdeposits.proxy.CommonProxy;
Expand Down Expand Up @@ -38,7 +39,7 @@
public final class RealisticDeposits {
public static final String MOD_ID = "realisticdeposits";
public static final String NAME = "Realistic Deposits";
public static final String VERSION = "0.4.0.110021";
public static final String VERSION = "0.5.0.110021";
private static final OrePatternType STRATIFORM_SEAM = StratiformSeamPattern.type()
.setRegistryName(OreSpawnIntegration.PATTERN_ID);
private static final OrePatternType COAL_MEASURES = CoalMeasuresPattern.type()
Expand All @@ -51,6 +52,8 @@ public final class RealisticDeposits {
.setRegistryName(OreSpawnIntegration.GOLD_LODE_ID);
private static final OrePatternType GOLD_PLACER = GoldPattern.type(true)
.setRegistryName(OreSpawnIntegration.GOLD_PLACER_ID);
private static final OrePatternType LAPIS_LENS = LapisPattern.type()
.setRegistryName(OreSpawnIntegration.LAPIS_LENS_ID);

@SidedProxy(clientSide = "zone.moddev.mc.realisticdeposits.proxy.ClientProxy",
serverSide = "zone.moddev.mc.realisticdeposits.proxy.CommonProxy")
Expand All @@ -69,6 +72,7 @@ public void registerPatterns(RegistryEvent.Register<OrePatternType> event) {
event.getRegistry().register(DIAMOND_PLACER);
event.getRegistry().register(GOLD_LODE);
event.getRegistry().register(GOLD_PLACER);
event.getRegistry().register(LAPIS_LENS);
}

@Mod.EventHandler
Expand All @@ -92,6 +96,7 @@ public void serverAboutToStart(FMLServerAboutToStartEvent event) {
CoalMeasuresPattern.newServerSession();
DiamondPattern.newServerSession();
GoldPattern.newServerSession();
LapisPattern.newServerSession();
}

@Mod.EventHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ private static void preview(ICommandSender sender, String[] args) throws Command
DepositDefinition definition = selectDefinition(state, args.length == 4 ? args[3] : null);
World world = sender.getEntityWorld();
String dimension = dimensionId(world.provider.getDimension());
if (definition.isLapis()) {
if (!(world instanceof net.minecraft.world.WorldServer)) {
throw new CommandException("Lapis previews require a server world");
}

sender.sendMessage(new TextComponentString(zone.moddev.mc.realisticdeposits.generation.LapisPattern
.preview(definition, (net.minecraft.world.WorldServer) world, regionX, regionZ)));
return;
}

if (definition.isGold()) {
if (!(world instanceof net.minecraft.world.WorldServer)) {
throw new CommandException("Gold previews require a server world");
Expand Down
Loading
Loading