Skip to content

Commit

Permalink
Merge branch 'PolyhedralDev:master' into allay
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd authored Oct 14, 2024
2 parents 61ed302 + 0a952cf commit 4fc24f0
Show file tree
Hide file tree
Showing 116 changed files with 1,827 additions and 617 deletions.
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Global owners, automatically request review when pull request is submitted
* @dfsek @solonovamax @duplexsystem @Astrashh @justaureus
* @dfsek @solonovamax @duplexsystem @astrsh @justaureus

# Platforms
/platforms/ @dfsek @solonovamax @duplexsystem @justaureus
/platforms/bukkit @dfsek @solonovamax @duplexsystem @justaureus @OakLoaf

# Common
/common/ @dfsek @solonovamax @duplexsystem @Astrashh
/common/ @dfsek @solonovamax @duplexsystem @astrsh

# Gradle Stuff
/buildSrc/ @dfsek @solonovamax @duplexsystem
*.gradle.kts @dfsek @solonovamax @duplexsystem
/gradle/ @dfsek @solonovamax @duplexsystem
/gradle/ @dfsek @solonovamax @duplexsystem
9 changes: 5 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
preRelease(true)

versionProjects(":common:api", version("6.4.3"))
versionProjects(":common:implementation", version("6.4.3"))
versionProjects(":platforms", version("6.4.3"))
versionProjects(":common:api", version("6.5.1"))
versionProjects(":common:implementation", version("6.5.1"))
versionProjects(":platforms", version("6.5.1"))


allprojects {
Expand All @@ -15,6 +15,7 @@ allprojects {
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
options.isIncremental = true
options.release.set(21)
}

tasks.withType<Test>().configureEach {
Expand Down Expand Up @@ -44,7 +45,7 @@ afterEvaluate {
}
project(":platforms:bukkit:common").configureDistribution()
forSubProjects(":common:addons") {
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "com.gradleup.shadow")

tasks.named("build") {
finalizedBy(tasks.named("shadowJar"))
Expand Down
12 changes: 6 additions & 6 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ repositories {
maven("https://repo.codemc.org/repository/maven-public") {
name = "CodeMC"
}
maven("https://papermc.io/repo/repository/maven-public/") {
maven("https://repo.papermc.io/repository/maven-public/") {
name = "PaperMC"
}
}

dependencies {
//TODO Allow pulling from Versions.kt
implementation("com.github.johnrengelman", "shadow", "8.1.1")
implementation("io.papermc.paperweight.userdev", "io.papermc.paperweight.userdev.gradle.plugin", "1.5.11")
implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.1")
implementation("io.papermc.paperweight.userdev", "io.papermc.paperweight.userdev.gradle.plugin", "1.7.2")

implementation("org.ow2.asm", "asm", "9.6")
implementation("org.ow2.asm", "asm-tree", "9.6")
implementation("org.ow2.asm", "asm", "9.7")
implementation("org.ow2.asm", "asm-tree", "9.7")
implementation("com.dfsek.tectonic", "common", "4.2.1")
implementation("org.yaml", "snakeyaml", "2.2")
implementation("org.yaml", "snakeyaml", "2.3")
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/CompilationConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ fun Project.configureCompilation() {
apply<TectonicDocPlugin>()

configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType<JavaCompile> {
Expand Down
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/DependencyConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fun Project.configureDependencies() {
maven("https://repo.codemc.org/repository/maven-public") {
name = "CodeMC"
}
maven("https://papermc.io/repo/repository/maven-public/") {
maven("https://repo.papermc.io/repository/maven-public/") {
name = "PaperMC"
}
maven("https://files.minecraftforge.net/maven/") {
Expand All @@ -48,6 +48,9 @@ fun Project.configureDependencies() {
maven("https://jitpack.io") {
name = "JitPack"
}
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "Sonatype Snapshots"
}
}

dependencies {
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/DistributionConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ import kotlin.io.path.exists


fun Project.configureDistribution() {
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "com.gradleup.shadow")

val downloadDefaultPacks = tasks.create("downloadDefaultPacks") {
group = "terra"
doFirst {
file("${buildDir}/resources/main/packs/").deleteRecursively()
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/" + Versions.Terra.overworldConfig + "/default.zip")
val defaultPackUrl =
URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/" + Versions.Terra.overworldConfig + "/default.zip")
downloadPack(defaultPackUrl, project)
}
}
Expand Down
49 changes: 25 additions & 24 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ object Versions {
const val paralithic = "0.7.1"
const val strata = "1.3.2"

const val cloud = "1.8.4"
const val cloud = "2.0.0"
const val cloudPaper = "2.0.0-beta.10"
const val cloudFabric = "2.0.0-beta.9"

const val caffeine = "3.1.8"

const val slf4j = "2.0.9"
const val log4j_slf4j_impl = "2.20.0"

const val slf4j = "2.0.16"

object Internal {
const val shadow = "8.1.1"
const val apacheText = "1.11.0"
const val apacheIO = "2.15.1"
const val guava = "32.1.3-jre"
const val asm = "9.6"
const val snakeYml = "2.2"
const val shadow = "8.3.1"
const val apacheText = "1.12.0"
const val apacheIO = "2.16.1"
const val guava = "33.3.0-jre"
const val asm = "9.7"
const val snakeYml = "2.3"
const val jetBrainsAnnotations = "24.1.0"
const val junit = "5.10.1"
const val junit = "5.11.0"
}
}

object Fabric {
const val fabricAPI = "0.91.2+${Mod.minecraft}"
const val fabricAPI = "0.104.0+${Mod.minecraft}"
}
//
// object Quilt {
Expand All @@ -37,14 +38,14 @@ object Versions {
// }

object Mod {
const val mixin = "0.12.5+mixin.0.8.5"
const val mixin = "0.15.3+mixin.0.8.7"

const val minecraft = "1.20.4"
const val yarn = "$minecraft+build.1"
const val fabricLoader = "0.15.1"
const val minecraft = "1.21.1"
const val yarn = "$minecraft+build.3"
const val fabricLoader = "0.16.5"

const val architecuryLoom = "1.4.369"
const val architecturyPlugin = "3.4.151"
const val architecuryLoom = "1.7.413"
const val architecturyPlugin = "3.4.159"
}
//
// object Forge {
Expand All @@ -53,14 +54,14 @@ object Versions {
// }

object Bukkit {
const val minecraft = "1.20.4"
const val paperBuild = "$minecraft-R0.1-20231209.173338-2"
const val minecraft = "1.21.1"
const val paperBuild = "$minecraft-R0.1-20240917.151311-80"
const val paper = paperBuild
const val paperLib = "1.0.8"
const val reflectionRemapper = "0.1.0"
const val reflectionRemapper = "0.1.1"
const val paperDevBundle = paperBuild
const val runPaper = "2.2.2"
const val paperWeight = "1.5.11"
const val runPaper = "2.3.1"
const val paperWeight = "1.7.2"
}

//
Expand All @@ -72,6 +73,6 @@ object Versions {
//
object CLI {
const val nbt = "6.1"
const val logback = "1.4.14"
const val logback = "1.5.8"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.dfsek.terra.addons.biome.extrusion.api;

import java.util.Collection;

import com.dfsek.terra.api.world.biome.Biome;

import java.util.Collection;


public interface Extrusion {
Biome extrude(Biome original, int x, int y, int z, long seed);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class BiomePipelineTemplate implements ObjectTemplate<BiomeProvider> {
@Default
@Description("""
The resolution at which to sample biomes.
Larger values are quadratically faster, but produce lower quality results.
For example, a value of 3 would sample every 3 blocks.""")
protected @Meta int resolution = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BiomePipelineTemplate extends BiomeProviderTemplate {
@Description("""
The initial size of biome chunks. This value must be at least 2.
<b>This is not the final size of biome chunks. Final chunks will be much larger</b>.
It is recommended to keep biome chunks' final size in the range of [50, 300]
to prevent performance issues. To calculate the size of biome chunks, simply
take initial-size and for each expand stage, multiply the running value by 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvi
@Default
@Description("""
The resolution at which to sample biomes.
Larger values are quadratically faster, but produce lower quality results.
For example, a value of 3 would sample every 3 blocks.""")
protected @Meta int resolution = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.dfsek.terra.addons.chunkgenerator.config.palette.BiomePaletteTemplate;
import com.dfsek.terra.addons.chunkgenerator.config.palette.slant.SlantLayerTemplate;
import com.dfsek.terra.addons.chunkgenerator.generation.NoiseChunkGenerator3D;
import com.dfsek.terra.addons.chunkgenerator.generation.math.SlantCalculationMethod;
import com.dfsek.terra.addons.chunkgenerator.palette.BiomePaletteInfo;
import com.dfsek.terra.addons.chunkgenerator.palette.slant.SlantHolder;
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
Expand Down Expand Up @@ -45,8 +46,8 @@ public void initialize() {
.priority(1000)
.then(event -> {

event.getPack().applyLoader(SlantHolder.CalculationMethod.class,
(type, o, loader, depthTracker) -> SlantHolder.CalculationMethod.valueOf((String) o));
event.getPack().applyLoader(SlantCalculationMethod.class,
(type, o, loader, depthTracker) -> SlantCalculationMethod.valueOf((String) o));

NoiseChunkGeneratorPackConfigTemplate config = event.loadTemplate(new NoiseChunkGeneratorPackConfigTemplate());
event.getPack().getContext().put(config);
Expand All @@ -57,7 +58,8 @@ public void initialize() {
pack -> new NoiseChunkGenerator3D(pack, platform, config.getElevationBlend(),
config.getHorizontalRes(),
config.getVerticalRes(), noisePropertiesPropertyKey,
paletteInfoPropertyKey));
paletteInfoPropertyKey, config.getSlantCalculationMethod(),
config.isSlantPalettesEnabled()));
event.getPack()
.applyLoader(SlantHolder.Layer.class, SlantLayerTemplate::new);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;

import com.dfsek.terra.addons.chunkgenerator.palette.slant.SlantHolder;
import com.dfsek.terra.addons.chunkgenerator.generation.math.SlantCalculationMethod;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.properties.Properties;

Expand All @@ -24,7 +24,11 @@ public class NoiseChunkGeneratorPackConfigTemplate implements ConfigTemplate, Pr

@Value("slant.calculation-method")
@Default
private SlantHolder.@Meta CalculationMethod slantCalculationMethod = SlantHolder.CalculationMethod.Derivative;
private @Meta SlantCalculationMethod slantCalculationMethod = SlantCalculationMethod.Derivative;

@Value("slant.disable-palettes")
@Default
private @Meta boolean disableSlantPalettes = false;

public int getElevationBlend() {
return elevationBlend;
Expand All @@ -38,7 +42,11 @@ public int getVerticalRes() {
return verticalRes;
}

public SlantHolder.CalculationMethod getSlantCalculationMethod() {
public SlantCalculationMethod getSlantCalculationMethod() {
return slantCalculationMethod;
}

public boolean isSlantPalettesEnabled() {
return !disableSlantPalettes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.List;
import java.util.Map;

import com.dfsek.terra.addons.chunkgenerator.generation.math.SlantCalculationMethod;
import com.dfsek.terra.addons.chunkgenerator.palette.BiomePaletteInfo;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.slant.SlantHolder;
Expand All @@ -27,7 +28,7 @@

public class BiomePaletteTemplate implements ObjectTemplate<BiomePaletteInfo> {
private final Platform platform;
private final SlantHolder.CalculationMethod slantCalculationMethod;
private final SlantCalculationMethod slantCalculationMethod;
@Value("slant")
@Default
@Description("The slant palettes to use in this biome.")
Expand Down Expand Up @@ -56,7 +57,7 @@ public BlockState get(int layer, double x, double y, double z, long seed) {
@Default
private @Meta boolean updatePalette = false;

public BiomePaletteTemplate(Platform platform, SlantHolder.CalculationMethod slantCalculationMethod) {
public BiomePaletteTemplate(Platform platform, SlantCalculationMethod slantCalculationMethod) {
this.platform = platform;
this.slantCalculationMethod = slantCalculationMethod;
}
Expand Down
Loading

0 comments on commit 4fc24f0

Please sign in to comment.