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
@@ -1,19 +1,19 @@
name: Base Gems 1.10 CI
name: Base Gems 1.11 CI

on:
push:
branches:
- master-1.10.2
- master-1.11.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- master-1.11.2

permissions:
contents: read

concurrency:
group: basegems-1.10-${{ github.workflow }}-${{ github.ref }}
group: basegems-1.11-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2.5.0.111021 for Minecraft 1.11.2

This port brings over the 33 gems, OreSpawn deposits, mining XP, smith trades
and both Fantasy Level settings from 1.10.2. Use Java 8, Forge 13.20.1.2588
or later for 1.11.2, Base Metals 2.5.1.111021 and MMD OreSpawn 4.1.6.111021.

- Updated smith trades and the Forge Mods config screen for Forge 1.11.2.
You can still open the same config from OreSpawn.
- Updated the resource pack format so 1.11.2 loads all 18 language files.
Gem ores still use overlays with the stone texture from your resource pack.
- Kept the block and item IDs, config keys and Ore Dictionary names from 1.10.2.
- Carried over ForgeGradle 7 and added a build check for the 1.11.2 branch.

2.5.0.110021 for Minecraft 1.10.2

Base Gems brings 33 gemstones to Minecraft 1.10.2. Use Java 8, Forge
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Base Gems for Minecraft 1.10.2
# Base Gems for Minecraft 1.11.2

Base Gems adds 33 gemstones to Base Metals. Mine agate and amethyst in upper
caves, look deeper for ruby and sapphire, or head down near bedrock for black
diamond. Trade gems with smiths or use them for storage blocks,
decorative pieces, tools and equipment.
diamond. Trade gems with smiths or use them for storage blocks, decorative
pieces, tools, weapons and shields.

## Installation

Use Java 8 and Forge **12.18.3.2511 or later for Minecraft 1.10.2**. Put the
Use Java 8 and Forge **13.20.1.2588 or later for Minecraft 1.11.2**. Put the
game jars in the `mods` folder on both the client and server:

- Base Gems `2.5.0.110021`.
- [Base Metals 2.6.0.110021](https://www.curseforge.com/minecraft/mc-mods/base-metals/files/9524447),
or a compatible update below 2.7.0.
- [MMD OreSpawn 4.1.6.110021](https://www.curseforge.com/minecraft/mc-mods/mmd-orespawn/files/9518063),
- Base Gems `2.5.0.111021`.
- [Base Metals 2.5.1.111021](https://www.curseforge.com/minecraft/mc-mods/base-metals/files/9526386),
or a compatible update below 2.6.0.
- [MMD OreSpawn 4.1.6.111021](https://www.curseforge.com/minecraft/mc-mods/mmd-orespawn/files/9524249),
or a compatible 4.x update.

Base Metals supplies the shared library. A separate MMDLib jar is not needed.
Expand Down Expand Up @@ -47,13 +47,12 @@ server and client in multiplayer.
## Mod compatibility

Other mods can use the Ore Dictionary names, such as `gemRuby`, `oreRuby`,
`blockRuby` and `dustRuby`. In basePower's Normal mode, the shared gear
entry lets gem gears stand in for sprockets in basePower, baseSteam and
baseElectric recipes.
`blockRuby`, `dustRuby` and `gearRuby`. The block and item IDs, config keys
and Ore Dictionary names carry over from 1.10.2.

## Development and credits

The 1.10.2 branch uses ForgeGradle 7 and builds a Java 8 mod.
The 1.11.2 branch uses ForgeGradle 7 and builds a Java 8 mod.
See [building and Eclipse setup](docs/BUILDING.md) and the
[changelog](CHANGELOG.txt).

Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ group = project.mod_group
version = project.mod_version
base.archivesName = 'BaseGems'

if (!(project.version ==~ /\d+\.\d+\.\d+\.110021/)) {
throw new GradleException('Use Major.Minor.Patch.110021 for Minecraft 1.10.2 on Forge.')
if (!(project.version ==~ /\d+\.\d+\.\d+\.111021/)) {
throw new GradleException('Use Major.Minor.Patch.111021 for Minecraft 1.11.2 on Forge.')
}

// Gradle and Mavenizer use modern JDKs; the mod and game still use Java 8.
Expand Down Expand Up @@ -54,10 +54,10 @@ def normalizeText = { details ->
eof: FixCrLfFilter.AddAsisRemove.newInstance('asis'))
}

def developmentOutput = layout.buildDirectory.dir('forge10-development/main')
def developmentOutput = layout.buildDirectory.dir('forge11-development/main')
def prepareDevelopmentMod = tasks.register('prepareDevelopmentMod', Sync) {
group = 'ide'
description = 'Merges production classes and processed resources for Forge 1.10 launches.'
description = 'Merges production classes and processed resources for Forge 1.11 launches.'
dependsOn tasks.named('classes')
from tasks.named('compileJava', JavaCompile).flatMap { it.destinationDirectory }
from sourceSets.main.output.resourcesDir
Expand Down Expand Up @@ -131,6 +131,8 @@ tasks.named('processResources', ProcessResources) {
inputs.property 'version', project.version
inputs.property 'mcversion', project.minecraft_version
filesMatching('mcmod.info') { expand version: project.version, mcversion: project.minecraft_version }
// Pack format 3 looks up locale filenames in lowercase.
filesMatching('assets/basegems/lang/*.lang') { name = name.toLowerCase(Locale.ROOT) }
rename '(.+_at.cfg)', 'META-INF/$1'
filesMatching(textPatterns, normalizeText)
}
Expand Down
4 changes: 2 additions & 2 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Building Base Gems for Minecraft 1.10.2
# Building Base Gems for Minecraft 1.11.2

Use Java 17 to run Gradle 9.6.1, Java 25 for ForgeGradle's Mavenizer, and
Java 8 for compilation and Minecraft. Put Java 17 on your command path and
Expand All @@ -13,7 +13,7 @@ python gradle/stage-legacy-dependencies.py .gradle/legacy-dependencies
```

On Linux or macOS, use `python3` and `./gradlew`. The game jar is
`build/libs/BaseGems-2.5.0.110021.jar`. Gradle builds the ore models from
`build/libs/BaseGems-2.5.0.111021.jar`. Gradle builds the ore models from
the tracked textures during resource processing.

`prepareEclipse` generates the Eclipse project and Java 8 launches with
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ org.gradle.caching=true
org.gradle.parallel=false
net.minecraftforge.gradle.merge-source-sets=false

minecraft_version=1.10.2
forge_version=12.18.3.2511
minecraft_version=1.11.2
forge_version=13.20.1.2588
mappings_channel=stable
mappings_version=29-1.10.2
mappings_version=32-1.11

mod_id=basegems
mod_group=zone.moddev.mc.basegems
mod_version=2.5.0.110021
mod_version=2.5.0.111021
mod_artifact=BaseGems
loader_name=forge
loader_code=1
Expand All @@ -22,8 +22,8 @@ java_setup_version=8.0.502+7
gradle_java_version=17
gradle_java_setup_version=17.0.1+12
mavenizer_java_version=25.0.3+9
orespawn_version=4.1.6.110021
orespawn_version_range=[4.1.6.110021,5.0.0)
orespawn_version=4.1.6.111021
orespawn_version_range=[4.1.6.111021,5.0.0)

basemetals_version=2.6.0.110021
basemetals_version_range=[2.6.0.110021,2.7.0)
basemetals_version=2.5.1.111021
basemetals_version_range=[2.5.1.111021,2.6.0)
14 changes: 7 additions & 7 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {
}
}

// Forge 1.10's mod scanner cannot read Java 11 multi-release entries. They are
// Forge 1.11's mod scanner cannot read Java 11 multi-release entries. They are
// unused on Java 8, so omit them from the development launcher copy.
tasks.register('prepareJava8Launcher', Jar) {
dependsOn configurations.java8LauncherArtifact
Expand All @@ -37,14 +37,14 @@ 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:9518063'
|| orespawn.sha256 != '05DB7CBFAADC815D6A713DACDFB9F0647BCED49CCFC357FB2FF010E95BD1379F') {
throw new GradleException('Use the verified OreSpawn 4.1.6.110021 release.')
if (orespawn.coordinate != 'curse.maven:mmd-orespawn-245586:9524249'
|| orespawn.sha256 != '4246D1EB83FFFC325F04E3D3FE331D1404714F4A8D773ADE278A5D0EBEE5EDBC') {
throw new GradleException('Use the verified OreSpawn 4.1.6.111021 release.')
}
def basemetals = specs.find { it.id == 'basemetals' }
if (basemetals.coordinate != 'curse.maven:base-metals-240967:9524447'
|| basemetals.sha256 != '9CA948215549C4A3D30D76339932ED489FB7D2C73A71A5F4F8F68456B8BC276B') {
throw new GradleException('Use the verified Base Metals 2.6.0.110021 release.')
if (basemetals.coordinate != 'curse.maven:base-metals-240967:9526386'
|| basemetals.sha256 != 'B69E62A786D32CB7D7129E237E3759355721F6D0ED90271C59B5E4444AF0F95C') {
throw new GradleException('Use the verified Base Metals 2.5.1.111021 release.')
}
specs.each { spec ->
def parts = spec.coordinate.split(':')
Expand Down
16 changes: 8 additions & 8 deletions gradle/dependencies.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[
{
"id": "basemetals",
"coordinate": "curse.maven:base-metals-240967:9524447",
"sha256": "9CA948215549C4A3D30D76339932ED489FB7D2C73A71A5F4F8F68456B8BC276B",
"coordinate": "curse.maven:base-metals-240967:9526386",
"sha256": "B69E62A786D32CB7D7129E237E3759355721F6D0ED90271C59B5E4444AF0F95C",
"repository": "https://www.cursemaven.com",
"runtime": true
},
{
"id": "orespawn",
"coordinate": "curse.maven:mmd-orespawn-245586:9518063",
"sha256": "05DB7CBFAADC815D6A713DACDFB9F0647BCED49CCFC357FB2FF010E95BD1379F",
"coordinate": "curse.maven:mmd-orespawn-245586:9524249",
"sha256": "4246D1EB83FFFC325F04E3D3FE331D1404714F4A8D773ADE278A5D0EBEE5EDBC",
"repository": "https://www.cursemaven.com",
"runtime": true
},
{
"id": "mantle",
"coordinate": "curse.maven:mantle-74924:2380279",
"sha256": "1678548421B9AA5188A1A209B39782AA6FAC1247E92ACB19F0FB58401F6718C7",
"coordinate": "curse.maven:mantle-74924:2413993",
"sha256": "6C1C79BD8491106D65240D4DF139E2BEA7914BA2622FAE0662ADB3047D5EDF9D",
"repository": "https://www.cursemaven.com"
},
{
"id": "tconstruct",
"coordinate": "curse.maven:tinkers-construct-74072:2425964",
"sha256": "BF9CB4E992F02500904A828181782486F2B8DD5F891D7972403CE92622917060",
"coordinate": "curse.maven:tinkers-construct-74072:2451489",
"sha256": "2D7F4A08EDDA2881A432CD80FF26575CCEA593FCC8A597A435652C1A53B14CB8",
"repository": "https://www.cursemaven.com"
}
]
16 changes: 8 additions & 8 deletions gradle/ide/eclipse.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ eclipse {
downloadJavadoc = true
file.beforeMerged { classpath ->
Set<String> managed = ['src/main/java', 'src/main/resources', 'src/test/java',
'build/resources/main', 'tools/validation/legacy110',
'tools/validation/legacy110/migration-probe',
'tools/validation/legacy110/launch-probe',
'tools/validation/legacy110/orespawn-probe'] as Set<String>
'build/resources/main', 'tools/validation/legacy111',
'tools/validation/legacy111/migration-probe',
'tools/validation/legacy111/launch-probe',
'tools/validation/legacy111/orespawn-probe'] as Set<String>
classpath.entries.removeAll { it.kind == 'src' && managed.contains(it.path) }
}
file.whenMerged { classpath ->
Expand Down Expand Up @@ -88,7 +88,7 @@ tasks.register('isolateEclipseProductionRuns') {
}
text = text.replace(arguments[0][0], arguments[0][1] + args + arguments[0][3])
text = text.replaceAll(/<mapEntry key="MC_VERSION" value="[^"]*"\/>/,
'<mapEntry key="MC_VERSION" value="1.10.2"/>')
'<mapEntry key="MC_VERSION" value="1.11.2"/>')
String modClasses = '<mapEntry key="MOD_CLASSES" value="' + escapeXml(file('bin/main').absolutePath) + '"/>'
if (text.contains('key="MOD_CLASSES"')) {
text = text.replaceAll(/<mapEntry key="MOD_CLASSES" value="[^"]*"\/>/,
Expand Down Expand Up @@ -156,11 +156,11 @@ tasks.register('verifyEclipseProductionClasspath') {
String text = file(name).getText('UTF-8').replace('\\', '/')
if (!text.contains('MAIN_TYPE" value="net.minecraftforge.launcher.Main"')
|| !text.contains('StandardVMType/JavaSE-8')
|| !text.contains('MC_VERSION" value="1.10.2"')
|| !text.contains('MC_VERSION" value="1.11.2"')
|| !text.contains('ATTR_EXCLUDE_TEST_CODE')
|| text.contains('gradleclasspathcontainer') || text.contains('bin/test')
|| text.contains('slime-launcher-0.2.2.jar')
|| text.contains('junit-') || text.contains('legacy110-probe')) {
|| text.contains('junit-') || text.contains('legacy111-probe')) {
throw new GradleException("Unsafe production launch: ${name}")
}
if (runtime.any { !text.contains(it.path.replace('\\', '/')) }
Expand All @@ -178,7 +178,7 @@ tasks.register('verifyEclipseProductionClasspath') {
def classpath = new groovy.xml.XmlSlurper().parse(file('.classpath'))
List<String> sourcePaths = classpath.classpathentry.findAll { it.@kind == 'src' }.collect { it.@path.text() }
if (sourcePaths.size() != sourcePaths.unique(false).size()
|| sourcePaths.contains('tools/validation/legacy110')) {
|| sourcePaths.contains('tools/validation/legacy111')) {
throw new GradleException('Eclipse retains stale or duplicate source-folder entries.')
}
classpath.classpathentry.findAll { it.@kind == 'src' && !it.@path.text().startsWith('src/main/')
Expand Down
2 changes: 1 addition & 1 deletion gradle/ore-models.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import groovy.json.JsonOutput

// Forge 1.10 predates Minecraft's data generator. Generate models during the build.
// Forge 1.11 predates Minecraft's data generator. Generate models during the build.
def assets = layout.projectDirectory.dir('src/main/resources/assets/basegems')
def textures = assets.dir('textures/blocks')
def solidTextures = fileTree(textures) { include '*_ore.png' }
Expand Down
20 changes: 10 additions & 10 deletions gradle/release/artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks.register('verifyJava8Toolchain') {
description = 'Checks Java 8 compatibility; exact compiler versions are required only for release builds.'
doLast {
def compiler = javaToolchains.compilerFor { languageVersion = JavaLanguageVersion.of(8) }.get().metadata
if (compiler.languageVersion.asInt() != 8) throw new GradleException('Minecraft 1.10 requires Java 8.')
if (compiler.languageVersion.asInt() != 8) throw new GradleException('Minecraft 1.11 requires Java 8.')
if (providers.gradleProperty('releaseBuild').getOrElse('false').toBoolean()
&& (compiler.javaRuntimeVersion != '1.8.0_502-b07'
|| System.getProperty('java.runtime.version') != '17.0.1+12')) {
Expand All @@ -38,23 +38,23 @@ tasks.register('verifyReleaseConfiguration') {
group = 'verification'
dependsOn tasks.named('verifyJava8Toolchain')
doLast {
if (project.group != 'zone.moddev.mc.basegems' || project.version != '2.5.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') {
if (project.group != 'zone.moddev.mc.basegems' || project.version != '2.5.0.111021'
|| project.minecraft_version != '1.11.2' || project.forge_version != '13.20.1.2588'
|| project.mappings_channel != 'stable' || project.mappings_version != '32-1.11') {
throw new GradleException('Base Gems target, mappings or Maven identity changed.')
}
String source = file('src/main/java/zone/moddev/mc/basegems/BaseGems.java').getText('UTF-8')
if (!source.contains('VERSION = "' + project.version + '"') || !source.contains('MODID = "basegems"')) {
throw new GradleException('The mod identity differs from the build metadata.')
}
if (project.orespawn_version != '4.1.6.110021'
|| project.orespawn_version_range != '[4.1.6.110021,5.0.0)'
if (project.orespawn_version != '4.1.6.111021'
|| project.orespawn_version_range != '[4.1.6.111021,5.0.0)'
|| !source.contains('required-after:orespawn@' + project.orespawn_version_range)
|| !source.contains('required-after:Forge@[12.18.3.2511,)')) {
|| !source.contains('required-after:forge@[13.20.1.2588,)')) {
throw new GradleException('The OreSpawn or Forge runtime requirement changed.')
}
if (project.basemetals_version != '2.6.0.110021'
|| project.basemetals_version_range != '[2.6.0.110021,2.7.0)'
if (project.basemetals_version != '2.5.1.111021'
|| project.basemetals_version_range != '[2.5.1.111021,2.6.0)'
|| !source.contains('required-after:basemetals@' + project.basemetals_version_range)) {
throw new GradleException('The published Base Metals runtime requirement changed.')
}
Expand Down Expand Up @@ -117,7 +117,7 @@ def auditJars = { File directory ->
throw new GradleException('Incorrect release manifest.')
}
def info = new JsonSlurper().parse(zip.getInputStream(zip.getEntry('mcmod.info')))[0]
if (info.modid != 'basegems' || info.version != project.version || info.mcversion != '1.10.2') {
if (info.modid != 'basegems' || info.version != project.version || info.mcversion != '1.11.2') {
throw new GradleException('Incorrect processed mcmod.info.')
}
if (zip.getEntry('zone/moddev/mc/basegems/BaseGems.class') == null) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/zone/moddev/mc/basegems/BaseGems.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
modid = BaseGems.MODID,
name = BaseGems.NAME,
version = BaseGems.VERSION,
dependencies = "required-after:Forge@[12.18.3.2511,);required-after:basemetals@[2.6.0.110021,2.7.0);required-after:orespawn@[4.1.6.110021,5.0.0);before:buildingbricks",
acceptedMinecraftVersions = "[1.10.2]",
dependencies = "required-after:forge@[13.20.1.2588,);required-after:basemetals@[2.5.1.111021,2.6.0);required-after:orespawn@[4.1.6.111021,5.0.0);before:buildingbricks",
acceptedMinecraftVersions = "[1.11.2]",
guiFactory = "zone.moddev.mc.basegems.client.BaseGemsGuiFactory")
public class BaseGems {

Expand All @@ -45,7 +45,7 @@ public class BaseGems {
* increased whenever a change is made that has the potential to break
* compatibility with other mods that depend on this one.
*/
public static final String VERSION = "2.5.0.110021";
public static final String VERSION = "2.5.0.111021";

private static final String PROXY_BASE = "zone.moddev.mc." + MODID + ".proxy.";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

/** Forge 1.10's configuration factory; never loaded by a dedicated server. */
/** Forge 1.11's configuration factory; never loaded by a dedicated server. */
@SideOnly(Side.CLIENT)
public final class BaseGemsGuiFactory implements IModGuiFactory {
@Override public void initialize(final Minecraft minecraft) { }
@Override public Class<? extends GuiScreen> mainConfigGuiClass() { return BaseGemsConfigScreen.class; }
@Override public boolean hasConfigGui() { return true; }
@Override public GuiScreen createConfigGui(final GuiScreen parent) { return new BaseGemsConfigScreen(parent); }
@Override public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { return Collections.emptySet(); }
@Override public RuntimeOptionGuiHandler getHandlerFor(final RuntimeOptionCategoryElement element) { return null; }
}
Loading
Loading