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 @@ -138,7 +138,7 @@ jobs:

- name: Build the isolated packaged-server probe
run: >-
./gradlew preparePolicyQualification --init-script tools/qualification/probes.init.gradle
./gradlew preparePolicyQualification prepareDiamondQualification prepareMineQualification --init-script tools/qualification/probes.init.gradle
--offline --no-daemon --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64"
-Dorg.gradle.java.installations.auto-detect=false
Expand All @@ -156,9 +156,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/RealisticDeposits-0.2.0.110021.jar
build/libs/RealisticDeposits-0.2.0.110021-sources.jar
build/libs/RealisticDeposits-0.2.0.110021-javadoc.jar
build/libs/RealisticDeposits-0.3.0.110021.jar
build/libs/RealisticDeposits-0.3.0.110021-sources.jar
build/libs/RealisticDeposits-0.3.0.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
echo
echo "- mode: \`publish\`"
echo "- release_version: \`$GITHUB_REF_NAME\`"
echo "- curseforge_release_level: \`alpha\`"
echo "- curseforge_release_level: \`beta\`"
echo "- confirm_live_publication: \`true\`"
echo
echo "The dispatcher checks the release bundle and requires explicit publication confirmation."
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.3.0.110021

Beta for Minecraft 1.10.2.

- Add rare, irregular diamond pipes and linked river placers. Keep the existing
iron and coal deposit shapes and ore settings.
- Add diamond-bearing gravel with a vanilla gravel background and subtle mineral
flecks. Mining leaves ordinary gravel and has a 1-in-16 diamond chance; Fortune
increases successful drops. Silk Touch and falling preserve the rich block.
- Keep diamond settings in their own catalogue. Preserve existing world profiles,
background generation and terrain rather than adding new rules to old saves.
- Keep 15% ordinary background diamonds and the 1-in-16 gravel roll. Tune pipes
to supply most diamonds, with river pockets as an occasional bonus.
- Honour explicit world-rule switches even when their catalogue default is off.
- Add separate diamond previews, packaged-server checks and an isolated test launch.
- Attempt abandoned workings at every new iron formation, coalfield and diamond
pipe where safe. Stepped access tunnels lead to short underground crosscuts;
river placers stay untouched. Keep existing world settings and opt-outs unchanged.
- Let workings pass through the natural rock blocks declared by Mineralogy's
OreSpawn profile, without confusing rock-definition names with block names.
- Replace long ladder shafts in new workings with winding stair runs, level
turning landings, timber supports and entrance guardrails. Keep already saved
mine layouts intact, including their unfinished sections.

## 0.2.0.110021

Beta for Minecraft 1.10.2.
Expand Down
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@

![Realistic Deposits logo](src/main/resources/assets/realisticdeposits/textures/logo.png)

Realistic Deposits is an extension for
[MMD OreSpawn](https://github.com/MinecraftModDevelopmentMods/OreSpawn) that
is being built to make valuable minerals feel like geological discoveries.
Instead of scattering a steady supply of small, isolated ore clusters
throughout the world, it plans rare formations large enough to reward
exploration and support sprawling mines, rail networks, and long-term resource
projects.
Realistic Deposits makes finding ore a reason to explore, then build a proper
mine. Rare iron districts, layered coalfields and diamond pipes give you
deposits worth returning to, with old workings leading into some of them.
Small pockets of diamond-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.

This beta adds coalfields and optional abandoned workings
alongside the existing iron districts. Back up your world before updating.

Coalfields use the exact-host API in the published OreSpawn 4.1.4.110021 release.
Version 0.3.0.110021 is a beta for Minecraft 1.10.2. It adds diamond deposits
and replaces deep ladder shafts in new workings with stepped entrances.
Existing worlds keep their settings and saved mine layouts. Back up important
worlds before updating.

## Current features

Expand All @@ -37,14 +35,17 @@ Coalfields use the exact-host API in the published OreSpawn 4.1.4.110021 release
Mineralogy is not required. See [coalfields](docs/COALFIELDS.md).
- Additive, hybrid, and replacement policies for controlling interaction with
ordinary ore generation.
- Rare diamond pipes and linked river placers, without adding new host rocks
or reshaping rivers. See [diamond deposits](docs/DIAMONDS.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 geometry and alignment tuning, with structural changes
clearly deferred until restart.
- Live reload for iron and coal geometry. Diamond geometry and other structural
changes wait until restart.
- An entry in both Forge's Mods configuration and OreSpawn's World Settings.
- Optional abandoned workings, with surface access and short seam-following
galleries. They are off by default; see the [mine settings](docs/ABANDONED_MINES.md).
- Abandoned workings with sloping, stepped entrances and short underground galleries.
New defaults attempt them at every iron formation, coalfield and diamond
pipe 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 All @@ -71,6 +72,7 @@ The first launch creates:
```text
config/realisticdeposits/deposits/vanilla.json
config/realisticdeposits/deposits/coal.json
config/realisticdeposits/deposits/diamonds.json
```

The supplied definition describes one rare iron district using a 640–960 block
Expand Down Expand Up @@ -132,8 +134,9 @@ formations:
/realisticdeposits reload
```

`reload` requires operator permission. It immediately applies `enabled`,
selection, shape, height, geome, family, and alignment changes. Resource,
`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. 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
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -647,3 +647,4 @@ tasks.named('check') {

apply from: 'gradle/release.gradle'
apply from: 'gradle/coal-manual.gradle'
apply from: 'gradle/diamond-manual.gradle'
37 changes: 25 additions & 12 deletions docs/ABANDONED_MINES.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,49 @@
# Abandoned mines

Some deposits can have old workings: a timber-framed surface shaft, a ladder
down to the seam, a short main gallery and a couple of side passages. Broken
Underground deposits can have old workings: a timber-framed entrance, a winding
stepped tunnel, a short main gallery and a couple of side passages. Broken
rails, cobwebs and small piles of fallen rock give them an abandoned look.
Most of the ore is left for you to mine. These workings contain no loot or
spawners, and they do not replace Minecraft's own mineshafts.

The feature is experimental and **off by default**. Older configuration files
remain off without needing any changes.
Fresh catalogues enable workings for iron formations, coalfields and diamond
pipes, with an attempt at every deposit where safe. Short stair runs and level
turning landings make the descent walkable in both directions, without a long
open drop. Guardrails protect the exposed approach. Iron and coal galleries
follow a seam; diamond workings make short crosscuts through one pipe. River
placers have no shafts or surface diggings.

## Enable it
Existing catalogues and world settings are not overwritten. An older world
with workings disabled keeps that choice.

Before creating a world, add this section to a deposit in
`config/realisticdeposits/deposits/vanilla.json`:
## Settings

Before creating a world, check the deposit's `abandoned_mine` section in
`config/realisticdeposits/deposits/vanilla.json`, `coal.json` or `diamonds.json`.
The new defaults are:

```json
"abandoned_mine": {
"enabled": true,
"chance": 0.15
"chance": 1.0
}
```

`chance` is the chance of attempting workings for each selected deposit, not
for each chunk. `0.15` means 15%; `0` disables attempts and `1` attempts every
deposit. Different deposit definitions can use different values.
deposit. Set `enabled` to `false` to turn workings off. Different deposit
definitions can use different values. Older definitions without this section
remain off.

Not every attempt finds a suitable site. This first version looks for dry,
Not every attempt finds a suitable site. The planner looks for dry,
reasonably level, open ground in the Overworld. It skips wooded entrances,
oceans, rivers, exposed galleries, excessive shaft depths and known structure
oceans, rivers, exposed galleries, excessive depths and known structure
collisions. It currently supports the normal and superflat terrain generators;
unrecognised terrain generators are left alone.

The seed and deposit settings choose the layout. Site safety still takes
priority: if custom deposits overlap, an already accepted mine keeps its space.
This first version does not join neighbouring mines into a larger complex.
It does not join neighbouring mines into a larger complex.

## Saved worlds

Expand All @@ -48,6 +58,9 @@ are protected, even if they had not yet been populated. A raw chunk first
created for a new mine can finish its initial population later, but only while
the saved plan still records that section as unbuilt.

Older ladder shafts are not rebuilt when you update. Their saved sections keep
the original layout; the stepped entrances apply only to newly planned mines.

If later generation places liquid or another structure in a planned section,
the mine leaves that section sealed rather than cutting into it. The server
log reports the obstruction. Clearing tunnels does not create item drops.
Expand Down
3 changes: 2 additions & 1 deletion docs/COALFIELDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ shows every setting.
- 384-768 blocks along strike and 128-256 blocks across.
- Two to four beds, 1-3 blocks thick, separated by 4-12 blocks of rock.
- Hybrid generation with 15% ordinary background coal.
- Abandoned workings off by default, with a 15% attempt chance when enabled.
- Abandoned workings attempted at every new coalfield where safe. Existing
catalogues and saved-world settings keep their choices.

Candidate selection is not a promise that every region has a coalfield.
Geology, available height, caves and safe hosts can reduce or reject a deposit.
Expand Down
80 changes: 80 additions & 0 deletions docs/DIAMONDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Diamond deposits

There are two linked deposits: steep diamond pipes and small pockets of
diamond-bearing river gravel. The 1-in-16 gravel roll stays fixed; pipes make
up most of the supply, with river pockets as an occasional bonus. Ordinary
background generation stays at 15%.

The six-seed ore survey estimates 3.57 diamonds per chunk against 3.70 in
the matched vanilla controls, before Fortune. Calibration and separate holdout
averages both fall within 20% of their controls. The estimated split is about
83% pipes, 2% placers and 15% background diamonds. Fortune increases all three
sources by the same vanilla multiplier.

These are regional estimates, not a promise for each seed or mining trip.
District clustering gives a wide statistical range, and other ores, caves,
structures and excavated workings can reduce the ore left to mine. The survey
counts pipe reserves before those losses. Some areas will be much richer
than others; exploration is part of finding a productive district.

## Pipes

Pipes occur in rare districts, normally beneath OreSpawn's stable cratons. Each
district contains one to three irregular bodies, wider near the top and narrower
at depth. Diamonds occur in patches rather than filling the whole body. A few
can occur close to the surface, but the upper parts are deliberately sparse.

Pipes cut across existing rocks. Without Mineralogy, their hosts are natural
vanilla stone, granite, diorite and andesite. With physical Mineralogy strata,
they can cut through the declared natural rocks. They do not require peridotite.
Kimberlite and lamproite are not represented by new blocks yet, so barren pipe
rock looks like the surrounding country rock. No craters or replacement terrain
are added.

Older Cyano geology has no stable-craton classification. In those worlds, the
same seed-based district planner uses an additional rarity check instead. It
does not change the world's geology settings.

## River gravel

Placers need submerged natural sand or gravel in a river, within 1,024 blocks
of a planned productive pipe district. The source is the saved district plan,
not the diamonds left in the ground: mining the pipe does not remove its
placers, and exploring the river first does not prevent them.

Mining diamond-bearing gravel leaves one ordinary gravel block as an item.
There is a 1-in-16 chance of also receiving a diamond. Fortune multiplies a
successful diamond drop in the same way as vanilla diamond ore; it does not
increase the initial chance. Silk Touch returns only the rich block. Falling
gravel keeps its identity, and ordinary gravel never becomes diamond-bearing
when placed again. There are no panning or processing recipes.

The rich block uses the vanilla gravel texture beneath a subtle mineral overlay,
so resource packs can replace its background.

## Settings and existing worlds

`config/realisticdeposits/deposits/diamonds.json` contains both definitions. It
is created only if absent; existing catalogues are never overwritten. The pipe
rule alone controls ordinary background diamonds. The placer rule adds sediment
and never applies a second background reduction or substitutes gravel for ore.

Disabling the source pipe rule also disables its placers. Disabling only the
placer rule leaves the pipes available. The geometry and source relationship
are saved with the world's OreSpawn profile and require a restart to change.

Existing world profiles do not gain these rules automatically. Updating the mod
does not remove their background diamonds or change old chunks. The new block
and its item stay registered even when generation is disabled.

Diamond pipes can have a stepped surface entrance and short underground crosscuts. New
defaults attempt these at every pipe where safe, as they do for iron and coal.
River placers stay untouched. Existing settings are preserved; see
[abandoned mines](ABANDONED_MINES.md). Mineralogy
is optional; its proposed new rocks and the wider mod integrations are separate
future work.

The current terrain adapters support normal and flat Overworld generation.
Unsupported generators are reported and skipped rather than loading nearby
chunks to guess a site. If that warning appears, disable the pipe rule in
OreSpawn to keep the ordinary diamond supply.
2 changes: 1 addition & 1 deletion docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.2.0.110021`; the final
branch. Enter the full numeric version, such as `0.3.0.110021`; the final
component identifies the Minecraft version and loader. CurseForge's alpha,
beta or release label is separate from the numeric version.

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.2.0.110021
mod_version=0.3.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
66 changes: 66 additions & 0 deletions gradle/diamond-manual.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// This profile has separate saves and settings from ordinary development runs.
tasks.named('isolateEclipseProductionRuns') {
doLast {
[['runClient.launch', 'runDiamondDepositsClient.launch'],
['runServer.launch', 'runDiamondDepositsServer.launch'],
['runClient.launch', 'runUndergroundMinesClient.launch'],
['runServer.launch', 'runUndergroundMinesServer.launch']].each { pair ->
String contents = file(pair[0]).getText('UTF-8')
String directory = pair[1].contains('UndergroundMines') ? 'run-underground-mines' : 'run-diamond-deposits'
contents = contents.replaceAll(
/(<stringAttribute key="org\.eclipse\.jdt\.launching\.WORKING_DIRECTORY" value=")[^"]*("\/>)/,
'$1' + file(directory).absolutePath.replace('\\', '\\\\') + '$2')
file(pair[1]).setText(contents.replace('\r\n', '\n'), 'UTF-8')
}
}
}

tasks.named('verifyEclipseProductionClasspath') {
doLast {
['runDiamondDepositsClient.launch', 'runDiamondDepositsServer.launch',
'runUndergroundMinesClient.launch', 'runUndergroundMinesServer.launch'].each { name ->
String contents = file(name).getText('UTF-8').replace('\\', '/')
String directory = name.contains('UndergroundMines') ? 'run-underground-mines' : 'run-diamond-deposits'
if (!contents.contains(directory) || !contents.contains('ATTR_EXCLUDE_TEST_CODE')) {
throw new GradleException("${name} must use separate saves and production-only output")
}
['src/test', 'bin/test', 'junit-', 'diamond-probe', 'diamond-survey'].each { forbidden ->
if (contents.contains(forbidden)) throw new GradleException("${name} exposes ${forbidden}")
}
}
}
}

tasks.register('prepareUndergroundMinesManual') {
group = 'verification'
description = 'Prepares fresh underground-mine defaults without changing existing test saves.'
dependsOn tasks.named('verifyEclipseProductionClasspath')
doLast {
['vanilla', 'coal', 'diamonds'].each { name ->
File target = file("run-underground-mines/config/realisticdeposits/deposits/${name}.json")
if (!target.exists()) {
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 runUndergroundMinesClient.launch and tools/qualification/DIAMOND_TESTING.md.')
logger.lifecycle('Other profiles and existing saves were left alone.')
}
}

tasks.register('prepareDiamondDepositsManual') {
group = 'verification'
description = 'Prepares a separate diamond test and its Eclipse launches.'
dependsOn tasks.named('verifyEclipseProductionClasspath')
doLast {
File target = file('run-diamond-deposits/config/realisticdeposits/deposits/diamonds.json')
if (!target.exists()) {
target.parentFile.mkdirs()
target.setText(file('src/main/resources/assets/realisticdeposits/defaults/diamonds.json')
.getText('UTF-8').replace('\r\n', '\n'), 'UTF-8')
}
logger.lifecycle('Use runDiamondDepositsClient.launch and tools/qualification/DIAMOND_TESTING.md.')
logger.lifecycle('Existing settings and saves were left alone. Use a new world for the fixed-seed walkthrough.')
}
}
Loading
Loading