Skip to content

Commit

Permalink
Merge 4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorrell committed Apr 8, 2023
2 parents e64fcc2 + a26c399 commit 24d913b
Show file tree
Hide file tree
Showing 123 changed files with 2,858 additions and 2,624 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
distribution: "temurin"
java-version: 17
- name: "Set up Gradle"
uses: "gradle/gradle-build-actions@v2"
uses: "gradle/gradle-build-action@v2"
- name: "Execute Gradle Build"
run: "./gradlew build"
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# gradle

.gradle/
build/
out/
classes/

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

# fabric

run/
remappedSrc/

test-worlds/
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

## [4.3.1] - 2023-04-08

### Changed
* Datapack settings changes now update without a client restart.

### Fixed
* Ferns added to the Day Trader advancement for Acacia Tree starts (#101).
* Removed injection into Fabric API internals which fixes Quilt support (#94).
* Fixed crash when converting a Vex into an Allay with Note Blocks.

## [4.3.0] - 2023-03-20

### Added
* Support for Minecraft 1.19.4
* The spawn platform now uses a configured feature and its location (absolute or relative to spawn) can be set using a datapack.
* Added `skyisland` command simplifying the generation of per-user or per-team spawn islands.

### Changed
* Reworked renewable deepslate so it no longer converts all blocks hit by the splash potion into deepslate.
There is probability depending on how much a potion effect would be applied.
With over half the potion length applied, conversion is guaranteed.
* Gateways generated when `gatewaysSpawnChorus` is `true` should now generate 10 blocks above the End Stone, not 10 blocks above the highest chorus flower.
* Removed the sign from the default spawn platform.
* Embedded datapack translations into the mod. The translation pack is now only required for non-English server clients without the mod.
* Translations now fall back to the server language when the client lacks the translation in their own language (1.19.4 only).

### Removed
* Support for Minecraft 1.19.2.

### Fixed
* Ferns added to the Day Trader advancement for Oak Tree starts (#101).
* Conversion should no longer depend on location or the velocity of the potion entity (#104).
* Chorus will no longer generate on every End Island when `gatewaysSpawnChorus` is `true`, only those created by End Gateways.
* Get Down advancement no longer triggers when falling into the void.
* The config setting `defaultToSkyBlockWorld` now changes the default server `level-type` to `carpetskyadditions:skyblock`.
* The config setting `initialTreeType` now accepts any capitalization of oak or acacia.

## [4.2.0] - 2023-01-11

### Added
* Spanish, partial Finnish, and partial Danish translations.
* Add a configuration file that allows SkyBlock worlds to be set as default.
Configuration works with `Mod Menu`.

### Changed
* Ores now have a crafting recipe instead of a Smithing Table recipe, so they can be better balanced.
* Ore drops are once again vanilla.
* `Cloth Config API` is now a dependency.

### Fixed
* Raw Gold, Iron, and Copper are once again obtainable (#81).
* Anvils converting Coal into Diamonds now works better with larger-than-vanilla max stack sizes.
* Nether portals once again only generate Netherrack/Nylium when forced.

[Unreleased]: https://github.com/jsorrell/CarpetSkyAdditions/compare/v4.3.1...HEAD
[4.3.1]: https://github.com/jsorrell/CarpetSkyAdditions/compare/v4.3.0...v4.3.1
[4.3.0]: https://github.com/jsorrell/CarpetSkyAdditions/compare/v4.2.0...v4.3.0
[4.2.0]: https://github.com/jsorrell/carpetskyadditions/releases/tag/v4.2.0
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-2022 Jack Sorrell
Copyright (c) 2021-2023 Jack Sorrell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
172 changes: 106 additions & 66 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,80 +6,26 @@ class Versions(properties: ExtraPropertiesExtension) {
val minecraft = properties["minecraft_version"] as String
val minecraftCompatibility = properties["compatible_minecraft_versions"] as String
val project = "$minecraft-$mod"
val yarnMappings = properties["yarn_mappings"] as String
val parchmentMappings = properties["parchment_mappings"] as String
val fabricLoader = properties["loader_version"] as String
val fabricApi = properties["fabric_version"] as String
val carpet = properties["carpet_core_version"] as String
val clothConfig = properties["cloth_config_version"] as String
val modmenu = properties["modmenu_version"] as String
}

val versions = Versions(project.extra)
val modId = project.extra["mod_id"] as String

plugins {
id("fabric-loom").version("1.1-SNAPSHOT")
id("com.diffplug.spotless") version "6.17.0"
id("fabric-loom") version "1.1-SNAPSHOT"
id("com.diffplug.spotless") version "latest.release"
id("io.github.juuxel.loom-quiltflower") version "latest.release"
id("org.jetbrains.changelog") version "latest.release"
id("com.modrinth.minotaur") version "latest.release"
}

base {
archivesName.set(modId)
}
val versions = Versions(project.extra)
val modId = project.extra["mod_id"] as String
version = versions.project

val fillBuildTemplate = tasks.register<Copy>("fillBuildTemplate") {
description = "Generates the Build.java file containing build parameters"
val templateContext = mapOf(
"id" to project.extra["mod_id"] as String,
"name" to project.extra["mod_name"] as String,
"version" to version,
"minecraft_version" to versions.minecraft,
"yarn_mappings" to versions.yarnMappings,
)
inputs.properties(templateContext)
from("src/template/java")
into(layout.buildDirectory.dir("generated/java"))
expand(templateContext)
}
sourceSets.main.get().java.srcDir(layout.buildDirectory.dir("generated/java"))

tasks {
withType<JavaCompile> {
dependsOn(fillBuildTemplate)
options.encoding = "UTF-8"
targetCompatibility = versions.java.toString()
sourceCompatibility = targetCompatibility
options.release.set(versions.java.ordinal + 1)
}

processResources {
val templateContext = mapOf(
"name" to project.extra["mod_name"],
"version" to version,
"mc_compatibility" to versions.minecraftCompatibility,
)

inputs.properties(templateContext)
filesMatching("fabric.mod.json") {
expand(templateContext)
}
}

java {
toolchain { languageVersion.set(JavaLanguageVersion.of(versions.java.ordinal + 1)) }
sourceCompatibility = versions.java
targetCompatibility = versions.java
}
jar {
// Embed license in output jar
from("LICENSE")
}
}

loom {
accessWidenerPath.set(file("src/main/resources/$modId.accesswidener"))
}

repositories {
maven("https://masa.dy.fi/maven") {
content {
Expand All @@ -96,11 +42,22 @@ repositories {
includeGroup("com.terraformersmc")
}
}
maven("https://maven.parchmentmc.org") {
name = "ParchmentMC"
content {
includeGroup("org.parchmentmc.data")
}
}
}

dependencies {
minecraft("com.mojang", "minecraft", versions.minecraft)
mappings("net.fabricmc", "yarn", versions.yarnMappings, null, "v2")
mappings(
loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${versions.parchmentMappings}@zip")
},
)
modImplementation("net.fabricmc", "fabric-loader", versions.fabricLoader)
modImplementation("carpet", "fabric-carpet", versions.carpet)

Expand All @@ -117,7 +74,53 @@ dependencies {
modImplementation("com.terraformersmc", "modmenu", versions.modmenu)
}

tasks["assemble"].dependsOn(
base {
archivesName.set(modId)
}

tasks {
processResources {
val templateContext = mapOf(
"name" to project.extra["mod_name"],
"version" to version,
"mc_compatibility" to versions.minecraftCompatibility,
)

inputs.properties(templateContext)
filesMatching("fabric.mod.json") {
expand(templateContext)
}
}

withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(versions.java.ordinal + 1)
}

java {
withSourcesJar()
sourceCompatibility = versions.java
targetCompatibility = versions.java
}

jar {
// Embed license in output jar
from("LICENSE") {
rename { "${it}_${base.archivesName.get()}" }
}
}

withType<AbstractArchiveTask> {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
}

loom {
accessWidenerPath.set(file("src/main/resources/$modId.accesswidener"))
}

tasks.assemble.get().dependsOn(
tasks.register<Zip>("zipTranslationPack") {
description = "Zips the Translations resource pack"
val tempDir = layout.buildDirectory.dir("translations-pack")
Expand All @@ -132,7 +135,6 @@ tasks["assemble"].dependsOn(
}
}
archiveClassifier.set("translations")
archiveVersion.set(versions.mod)
group = "build"
from(tempDir)
destinationDirectory.set(base.distsDirectory)
Expand All @@ -145,7 +147,6 @@ tasks["assemble"].dependsOn(
from("src/main/resources/resourcepacks/skyblock")
}
archiveClassifier.set("datapack")
archiveVersion.set(versions.mod)
group = "build"
from(tempDir)
destinationDirectory.set(base.distsDirectory)
Expand Down Expand Up @@ -183,3 +184,42 @@ spotless {
(jackson() as JacksonYamlGradleConfig).yamlFeature("WRITE_DOC_START_MARKER", false)
}
}

changelog {
version.set(versions.mod)
repositoryUrl.set(project.extra["repository"] as String)
introduction.set(
"""
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
""".trimIndent(),
)
groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed"))

// Curseforge markdown doesn't recognize "-"
itemPrefix.set("*")
}

modrinth {
token.set(providers.environmentVariable("MODRINTH_TOKEN"))
projectId.set("carpet-sky-additions")
versionNumber.set(providers.gradleProperty("mod_version"))
versionName.set("${versions.mod} for Minecraft ${versions.minecraft}")
versionType.set("release")
uploadFile.set(tasks.remapJar)
gameVersions.add(versions.minecraft)
loaders.add("fabric")
changelog.set(
provider {
project.changelog.renderItem(project.changelog.get(versions.mod).withHeader(false).withEmptySections(false).withLinks(false))
},
)
dependencies {
required.project("fabric-api")
required.project("carpet")
required.project("cloth-config")
optional.project("modmenu")
}
}
tasks.modrinth.get().dependsOn(tasks.patchChangelog)
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ org.gradle.jvmargs=-Xmx1G
# Mod Properties
mod_id=carpetskyadditions
mod_name=Carpet Sky Additions
mod_version=4.3.0
repository=https://github.com/jsorrell/CarpetSkyAdditions
mod_version=4.3.1
java_version=17
# Fabric Properties
# see https://fabricmc.net/develop/
minecraft_version=1.19.3
compatible_minecraft_versions=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.17
loader_version=0.14.19
# Fabric Api
fabric_version=0.76.0+1.19.3
# see https://parchmentmc.org/docs/getting-started
parchment_mappings=1.19.3:2023.03.12
# see https://masa.dy.fi/maven/carpet/fabric-carpet/
carpet_core_version=1.19.3-1.4.96+v230201
# see https://linkie.shedaniel.me/dependencies
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pluginManagement {
repositories {
maven("https://maven.fabricmc.net")
maven("https://maven.fabricmc.net") {
name = "FabricMC"
}
gradlePluginPortal()
}
}
Loading

0 comments on commit 24d913b

Please sign in to comment.