Skip to content

Commit

Permalink
Version 1.10-1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hea3ven committed Jun 25, 2016
1 parent 84e1bcf commit e775c50
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 34 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.10-1.2.2:
* Update to Minecraft 1.10.

1.9.4-1.2.2:
* Update to Minecraft 1.9.4.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
classpath 'org.ajoberstar:grgit:1.4.1'
}
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project_display_name=Hard Mode Tweaks
project_version=1.2.2
project_class=com.hea3ven.hardmodetweaks.ModHardModeTweaks
project_repo=hea3ven/HardModeTweaks
project_repo_branch=mc1.9.4
project_repo_branch=mc1.10
project_curseforge_id=231325
project_curseforge_name_id=hard-mode-tweaks
project_curseforge_type=release
Expand All @@ -13,14 +13,14 @@ project_changelog_file=CHANGELOG
project_bootstrap_file=assets/hardmodetweaks/bootstrap.json
project_coremod=com.hea3ven.hardmodetweaks.core.LoadingPluginHardModeTweaks

version_mc=1.9.4
version_forge=12.17.0.1909
version_forge_branch=1.9.4
version_mappings=snapshot_20160519
version_mc=1.10
version_forge=12.18.0.1986
version_forge_branch=1.10.0
version_mappings=snapshot_20160623

version_h3nt_mappings=1.1.1
version_h3nt_mappings_pattern=1.1.x
version_asmtweaks=1.1.1
version_asmtweaks_pattern=1.1.x
version_commonutils=1.9.4-2.2.1
version_commonutils=1.9.4-2.2.2
version_commonutils_pattern=1.9.4-2.2.x
40 changes: 37 additions & 3 deletions mcbuild.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Hea3veN's build script for minecraft mods
// v1.0.9 (2016-06-24):
// * Improve the sorting
// v1.0.8 (2016-06-12):
// * Sort the entries in the update.json
// v1.0.7 (2016-05-09):
// * Remove the code to update the README
// v1.0.6 (2016-05-05):
Expand Down Expand Up @@ -217,22 +221,26 @@ class UpdateFile {
}

def save(File file) {
Map<String, Object> data = new HashMap()
def data = [:]
data.put('homepage', homepage)
promotions = promotions.sort { k1, k2 -> compareVersions(k1.key, k2.key) }
data.put('promos', promotions)
versions = versions.sort { k1, k2 -> compareVersions(k1.key, k2.key) }
versions.each { mcVersion, v ->
data[mcVersion] = new HashMap()
data[mcVersion] = [:]
data[mcVersion]['commit'] = commits[mcVersion]
v.each { version, changelog ->
data[mcVersion][version] = changelog.save()
}
data[mcVersion] = data[mcVersion].sort { k1, k2 -> compareVersions(k1.key, k2.key) }
}
data = data.sort { k1, k2 -> compareVersions(k1.key, k2.key) }
file.setText(new JsonBuilder(data).toPrettyString())
}

def saveChangelog(File file) {
def changelogText = ''
versions.sort { it.key }.collect { it.value }.reverseEach {
versions.sort { k1, k2 -> compareVersions(k1.key, k2.key) }.collect { it.value }.reverseEach {
def sortedChangelogs = [:]
it.sort {
it.key + ((!it.key.contains('-beta') && !it.key.contains('-alpha')) ? '-release' : '')
Expand All @@ -243,6 +251,32 @@ class UpdateFile {
}
file.setText(changelogText)
}

def compareVersions(String v1, String v2) {
String[] parts1 = v1.split(/[.-]/)
String[] parts2 = v2.split(/[.-]/)
def i = 0
while (parts1.length > i && parts2.length > i) {
if (parts1[i].isInteger() && parts2[i].isInteger()) {
def cmp = parts1[i] as int <=> parts2[i] as int
if (cmp != 0)
return cmp
} else {
if (i > 0 && parts1[i].isInteger())
return 1
else if (i > 0 && parts2[i].isInteger())
return -1
else
return parts1[i] <=> parts2[i]
}
i++
}
if (parts1.length > parts2.length)
return 1
if (parts1.length < parts2.length)
return -1
return 0
}
}

class Changelog {
Expand Down
54 changes: 30 additions & 24 deletions media/update.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
{
"1.9.4": {
"commit": "38320e442af4ec15900ff9bf68008aabeb4a7447",
"1.9.4-1.2.2": " * Update to Minecraft 1.9.4."
},
"1.8": {
"1.8-1.1.4": " * Added config to modify foods values and saturation.\n * Added config to limit the break speed of blocks, fixes #3.\n * Fixed a performance issue when loading classes, fixes #2.\n * Fix the sleep prevention tweak not working.",
"commit": null,
"1.8-1.1.2": " * Added tweak to prevent being able to sleep in recently placed beds.\n * Added tweak to prevent creepers from spawning on blocks with direct sky access.\n * Added config option for zombie's knockbackResistance attribute.\n * Update to minecraft 1.8.",
"1.8-1.1.3": " * Fixed sometimes crashing when using beds, fixes #1."
},
"1.7.10": {
"1.1.2": " * Added tweak to prevent being able to sleep in recently placed beds.\n * Added tweak to prevent creepers from spawning on blocks with direct sky access.\n * Added config option for zombie's knockbackResistance attribute.",
"1.1.3": " * Fixed sometimes crashing when using beds, fixes #1.",
"1.1.4": " * Added config to modify foods values and saturation.\n * Added config to limit the break speed of blocks, fixes #3.\n * Fixed a performance issue when loading classes, fixes #2.",
"commit": null,
"1.0b1": " * initial release.",
"1.0b2": " * Added extra config options for the eating regen.\n * Added config options for the damage of monsters.",
"1.0b3": " * Added damage config options for endermen, ghasts and silverfish.\n * Fixed typo error on the dayLengthMultiplier option.",
"1.0b4": " * Added config option for arrows to ignore armor. * Added tweak for animals to run away from attacker instead of randomly.\n * Prevent healing when eating if the food has a negative effect.",
"1.1.0": " * Added config to make the day longer/shorter than the night.\n * Added config gui, config file was reestructured.\n * Added tweaks to spiders. * Removed tweaks to the mobs damage.",
"1.1.1": " * Added tweak to make leaves blocks non-solid (like vines).\n * Added tweak to prevent boats from breaking."
"1.1.1": " * Added tweak to make leaves blocks non-solid (like vines).\n * Added tweak to prevent boats from breaking.",
"1.1.2": " * Added tweak to prevent being able to sleep in recently placed beds.\n * Added tweak to prevent creepers from spawning on blocks with direct sky access.\n * Added config option for zombie's knockbackResistance attribute.",
"1.1.3": " * Fixed sometimes crashing when using beds, fixes #1.",
"1.1.4": " * Added config to modify foods values and saturation.\n * Added config to limit the break speed of blocks, fixes #3.\n * Fixed a performance issue when loading classes, fixes #2.",
"commit": null
},
"1.8": {
"1.8-1.1.2": " * Added tweak to prevent being able to sleep in recently placed beds.\n * Added tweak to prevent creepers from spawning on blocks with direct sky access.\n * Added config option for zombie's knockbackResistance attribute.\n * Update to minecraft 1.8.",
"1.8-1.1.3": " * Fixed sometimes crashing when using beds, fixes #1.",
"1.8-1.1.4": " * Added config to modify foods values and saturation.\n * Added config to limit the break speed of blocks, fixes #3.\n * Fixed a performance issue when loading classes, fixes #2.\n * Fix the sleep prevention tweak not working.",
"commit": null
},
"1.9": {
"1.9-1.2.0": " * Remove the food healing mechanic and replace it with regeneration that consumes a lot more saturation/hunger.\n * Update to minecraft 1.8.9.",
"1.9-1.2.1": " * Update to Forge 12.16.0.1811.",
"commit": "5426ca718280631c2cfa36b73af39a74c09b3d3a",
"1.9-1.2.2": " * Update to java 8.\n * Update to Forge 12.16.1.1894.\n * Fix the bed placement tracking not persisting through restarts."
"1.9-1.2.2": " * Update to java 8.\n * Update to Forge 12.16.1.1894.\n * Fix the bed placement tracking not persisting through restarts.",
"commit": "5426ca718280631c2cfa36b73af39a74c09b3d3a"
},
"1.9.4": {
"1.9.4-1.2.2": " * Update to Minecraft 1.9.4.",
"commit": "38320e442af4ec15900ff9bf68008aabeb4a7447"
},
"1.10": {
"1.10-1.2.2": " * Update to Minecraft 1.10.",
"commit": "84e1bcf22924599cb2510c3af4a12adfc568d5de"
},
"homepage": "https://github.com/hea3ven/HardModeTweaks",
"promos": {
"1.8-latest": "1.1.4",
"1.7.10-latest": "1.8.8-1.1.4",
"1.9-latest": "1.9-1.2.2",
"1.7.10-recommended": "1.8.8-1.1.4",
"1.8-latest": "1.1.4",
"1.8-recommended": "1.1.4",
"1.9.4-recommended": "1.9.4-1.2.2",
"1.9-latest": "1.9-1.2.2",
"1.9-recommended": "1.9-1.2.2",
"1.9.4-latest": "1.9.4-1.2.2"
},
"homepage": "https://github.com/hea3ven/HardModeTweaks"
}
"1.9.4-latest": "1.9.4-1.2.2",
"1.9.4-recommended": "1.9.4-1.2.2",
"1.10-latest": "1.10-1.2.2",
"1.10-recommended": "1.10-1.2.2"
}
}

0 comments on commit e775c50

Please sign in to comment.